lua-users home
lua-l archive

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


>>>>> "actboy168" == actboy168  <actboy168@gmail.com> writes:

 > To quote from the reference manual :
 >> luaL_newstate [-0, +0, –]
 >> Returns the new state, or NULL if there is a memory allocation error.

 actboy168> But now luaL_openlibs

I assume you meant luaL_newstate?

 actboy168> will call lua_newuserdatauv and luaL_ref, and then they have
 actboy168> a chance to raise a memory error.

Yes. This is just another rough edge from the poorly-thought-out
warnings system: if there's enough memory to allocate a state, but not
enough to allocate a (full) userdata and luaL_ref it, then the panic
function will be called leading to an abort().

-- 
Andrew.