[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaL_newstate in Lua 5.4
- From: Andrew Gierth <andrew@...>
- Date: Mon, 02 Nov 2020 06:08:36 +0000
>>>>> "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.