lua-users home
lua-l archive

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


Hi,

I'm researching the Lua codebase and I'm a bit confused here:
luaL_newstate sets panicf for a newly created state which uses
lua_tostring in it.
Lua doc states that lua_tostring can fail on memory allocation: [-0,
+0, m] (when it converts number to string?).
In Lua doc §4.4 there's a complicated description, which if I got it
correctly, implies that the panic function should use only API calls
that cannot raise errors.
However when a memory allocation error occurs (is it LUA_ERRMEM?), doc
states that for such errors Lua does not call the message handler.
Is panic function a message handler?

Regards.