- Pseudoindex was removed. You must get the global environment from the registry (see ).
- Pseudoindex
LUA_ENVIRONINDEX
and functionslua_getfenv
/lua_setfenv
were removed, as C functions no longer have environments. - Function
luaL_register
is deprecated. UseluaL_setfuncs
so that your module does not create globals. (Modules are not expected to set global variables anymore.) - Finalizers (
__gc
metamethods) for userdata are called in the reverse order that they were marked for finalization, not that they were created (see ). (Most userdata are marked immediately after they are created.) Moreover, if the metatable does not have a__gc
field when set, the finalizer will not be called, even if it is set later. luaL_typerror
was removed. Write your own version if you need it.- Function
lua_cpcall
is deprecated. You can simply push the function withlua_pushcfunction
and call it with . - Function
lua_objlen
was renamedlua_rawlen
. - Function has an extra parameter,
mode
. PassNULL
to simulate the old behavior. - Function
lua_resume
has an extra parameter,from
. Pass or the thread doing the call.