[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaL_dofile() returns LUA_YIELD ?
- From: "Pixel Pusher" <pixpush@...>
- Date: Wed, 21 Nov 2007 16:27:35 +0100
2007/11/21, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
> > can anyone plase point me to documented cases where luaL_dofile() returns a
> > LUA_YIELD error code ?
>
> http://www.lua.org/manual/5.1/manual.html#luaL_dofile says luaL_dofile only
> returns 0 or 1.
>
I was also reading that lua_pcall returns error codes defined in
lua.h, such as: LUA_ERRRUN,LUA_ERRMEM, LUA_ERRERR...
Since in lua.h the code LUA_YIELD is defined along with those others,
and since luaL_dofile si defined as: (luaL_loadstring(L, str) ||
lua_pcall(L, 0, LUA_MULTRET, 0))
I was wondering if it's actually lua_pcall returning the error
code...and thus possibly returning LUA_YIELD. (?!)
I'm asking because I'm using no coroutines at all, and because
apparently LUA_YIELD looks mainly like a coroutine-type error code
(?!).
Using 5.1.2, btw.