Incompatibilities in the API
Full userdata now has an arbitrary number of associated user values. Therefore, the functions
lua_newuserdata,lua_setuservalue, andlua_getuservaluewere replaced bylua_newuserdatauv,lua_setiuservalue, andlua_getiuservalue, which have an extra argument.For compatibility, the old names still work as macros assuming one single user value. Note, however, that userdata with zero user values are more efficient memory-wise.
The function
lua_resumehas an extra parameter. This out parameter returns the number of values on the top of the stack that were yielded or returned by the coroutine. (In previous versions, those values were the entire stack.)The function
lua_versionreturns the version number, instead of an address of the version number. The Lua core should work correctly with libraries using their own static copies of the same core, so there is no need to check whether they are using the same address space.The constant
LUA_ERRGCMMwas removed. Errors in finalizers are never propagated; instead, they generate a warning.The options
LUA_GCSETPAUSEandLUA_GCSETSTEPMULof the functionlua_gcare deprecated. You should use the new optionLUA_GCINCto set them.
Luadocs