lua-users home
lua-l archive

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


Am 26.07.2016 12:19, schrieb Marc Balmer:
So after I added lua_checkstack() calls before creating a number of user values
everything is fine again.

Does lua_newtable() (and all functions that push values) need this as well?
Yes, if you push anything on the stack you should be sure that there is a free slot available.

What does lua_newuseradate() actually return when there is not enough space
on stack, NULL or some rogue pointer?


The userdata itself is not allocated on the stack, only the handle is. So the returned pointer is probably a valid pointer.
--
Thomas