[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Conditional lua_yield
- From: Enrico Colombini <erix@...>
- Date: Fri, 31 Oct 2008 11:46:32 +0100
The manual states that lua_yield "should only be called as the return
expression of a C function".
Can I have a conditional yield on return? e.g. is this valid or could it
give trouble (possibly depending on the compiler)?
if (mustYield) {
return lua_yield(lua, 0);
} else {
return 0;
}
I suppose so, but just to be safe...
Enrico