lua-users home
lua-l archive

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


On Feb 22, 2002 at 12:18 -0000, staticengine wrote:
> I'm trying to get the Yield Patch working correctly under (I believe 
> 4.0), and I'm noticing that in the popcallinfo() function (in ldo.c), 
> L->callinfostack will be set to NULL if ci->prev is NULL,

Yeah, I think that's on purpose...

> thus 
> crashing the program later on.

Do you know where it crashes?  IIRC, L->callinfostack is allowed to be
NULL; it just means you're at the top level of the call stack.  Unlike
the regular Lua stack, L->callinfostack is a linked list, so when it's
NULL that means it's empty.

Unfortunately there are definitely some fundamental bugs left in the
yield() patch; also unfortunately I'm short on Lua-hacking-time these
days, so all I can offer right now is general pointers to anyone who
wants to delve into this.

-- 
Thatcher Ulrich <tu@tulrich.com>
http://tulrich.com