lua-users home
lua-l archive

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


> Is it correct to say for these functions returning C pointers:
> ...
> that "the returned pointer is valid while the element remains in the
> stack, after that it could become invalid due to garbage collection."?

Yes. (Well, the results from lua_topointer should never be dereferenced,
so they are never actually "valid".)


> (Idle question: is there a reason why luaopen_base() returns 0 while 
> luaopen_table() and the other similar luaopen_...() return 1?)

The others return the created table. Baselib does not create a table
for its elements (well, forget about "coroutine"...)

-- Roberto