• Pseudoindex was removed. You must get the global environment from the registry (see ).
    • Pseudoindex LUA_ENVIRONINDEX and functions lua_getfenv/lua_setfenv were removed, as C functions no longer have environments.
    • Function luaL_register is deprecated. Use luaL_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 with lua_pushcfunction and call it with .
    • Function lua_objlen was renamed lua_rawlen.
    • Function has an extra parameter, mode. Pass NULL to simulate the old behavior.
    • Function lua_resume has an extra parameter, from. Pass or the thread doing the call.