lua-users home
lua-l archive

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


The C API reference is slowly progressing (do not expect anything too soon). I 
have a question:

Is it correct to say for these functions returning C pointers:

 lua_tostring()
 lua_pushfstring()
 lua_pushvfstring()
 lua_newuserdata()
 lua_touserdata()
 lua_topointer()
 lua_tothread()  (?)

that "the returned pointer is valid while the element remains in the stack, 
after that it could become invalid due to garbage collection."?


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

  Enrico