diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.244 2010/06/10 21:29:47 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.245 2010/06/13 19:41:34 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -496,7 +496,7 @@ LUAMOD_API int luaopen_base (lua_State *L) { | |||
496 | lua_pushglobaltable(L); | 496 | lua_pushglobaltable(L); |
497 | lua_setfield(L, -2, "_G"); | 497 | lua_setfield(L, -2, "_G"); |
498 | /* open lib into global table */ | 498 | /* open lib into global table */ |
499 | luaL_register(L, "_G", base_funcs); | 499 | luaL_setfuncs(L, base_funcs, 0); |
500 | lua_pushliteral(L, LUA_VERSION); | 500 | lua_pushliteral(L, LUA_VERSION); |
501 | lua_setfield(L, -2, "_VERSION"); /* set global _VERSION */ | 501 | lua_setfield(L, -2, "_VERSION"); /* set global _VERSION */ |
502 | /* `newproxy' needs a weaktable as upvalue */ | 502 | /* `newproxy' needs a weaktable as upvalue */ |