lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Because of the example code, one might expect to be able to write
> something like:
> 
>      int original_function (lua_State *L) {
>        ...     /* code 1 */
>        return k(L, lua_callk(L, n, m, h, ctx2, k), ctx1);
>      }
> 
> but that doesn't work because the lua_callk return type is void. Maybe
> lua_call[k] should return an integer, always LUA_OK? (For symmetry
> reasons...) We could also have lua_yieldk return an int (LUA_YIELD),
> but of course lua_yieldk always results in a yield and longjmp; it
> would just look pretty.]

We would have to think about it. (BTW, lua_yieldk already returns
an int, for historical reasons.)


> ** Well actually it apparently can, if yielding across a C call
> boundary or in the main thread. Is that an error in the manual?

Yes.

Many thanks for the feedback!

-- Roberto