来源:lua
浏览 577
扫码
分享
2020-04-25 13:28:41
7.3 – Changes in the API
- The
luaopen_*
functions (to open libraries) cannot be called directly, like a regular C function. They must be called through Lua, like a Lua function. - Function
lua_open
was replaced by lua_newstate
to allow the user to set a memory-allocation function. You can use luaL_newstate
from the standard library to create a state with a standard allocation function (based on realloc
). - Functions
luaL_getn
and luaL_setn
(from the auxiliary library) are deprecated. Use lua_objlen
instead of luaL_getn
and nothing instead of luaL_setn
. - Function
luaL_openlib
was replaced by luaL_register
. - Function
luaL_checkudata
now throws an error when the given value is not a userdata of the expected type. (In Lua 5.0 it returned NULL
.)
当前内容版权归
lua 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问
lua .