Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua 5.2 doesn't have the lua_objlen function #46

Closed
imzyxwvu opened this issue Sep 6, 2014 · 0 comments
Closed

Lua 5.2 doesn't have the lua_objlen function #46

imzyxwvu opened this issue Sep 6, 2014 · 0 comments

Comments

@imzyxwvu
Copy link
Contributor

imzyxwvu commented Sep 6, 2014

From the Lua 5.2 manual:

Function lua_objlen was renamed lua_rawlen.

And in the common.h file:

#if LUA_VERSION_NUM < 502
/* lua_rawlen: Not entirely correct, but should work anyway */
#   define lua_rawlen lua_objlen
/* lua_...uservalue: Something very different, but it should get the job done */
#   define lua_getuservalue lua_getfenv
#   define lua_setuservalue lua_setfenv
#   define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
#   define luaL_setfuncs(L,l,n) (assert(n==0), luaL_register(L,NULL,l))
#endif

So please replace lua_objlen with lua_rawlen and do not use it any more to make the code's compliance better.

By the way, lua_objlen is just lua_rawlen so that comment can be removed.

@imzyxwvu imzyxwvu closed this as completed Sep 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant