lua-users home
lua-l archive

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


On Thursday 16 March 2006 2:05 pm, Lee Smith wrote:
> I should also note, that this appears to function just fine when all the
> code is in one file.  Although the differences there could be that in my
> actual application I'm using lua_dobuffer to load the chunks, and in my
> little proof of concept application I'm using lua_dofile.

i think it _is_ a scoping issue, the 'co' variable in file3 might not be the 
same as 'co' in file 1.  try to keep it in one file, and after loading it get 
the three function pointers to directly call each one from C.  it's much 
easier to manage that way.

it's right to pass 'process', not process() to coroutine.create(); remember 
that it takes a function (that is process), not the result of calling the 
function (that would be process()).

-- 
Javier

Attachment: pgp4j3Jm_DMGL.pgp
Description: PGP signature