Use names defined in lualib.h for library registration.

This commit is contained in:
Mike Pall
2011-02-02 02:38:59 +01:00
parent 1505d6ffde
commit 2c8945d3e7
11 changed files with 17 additions and 19 deletions

View File

@@ -167,7 +167,7 @@ LUALIB_API int luaopen_math(lua_State *L)
RandomState *rs;
rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState));
rs->valid = 0; /* Use lazy initialization to save some time on startup. */
LJ_LIB_REG(L, math);
LJ_LIB_REG(L, LUA_MATHLIBNAME, math);
#if defined(LUA_COMPAT_MOD)
lua_getfield(L, -1, "fmod");
lua_setfield(L, -2, "mod");