diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.179 2005/07/07 15:48:29 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.180 2005/07/12 18:15:11 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 | */ |
@@ -602,7 +602,7 @@ static void auxopen (lua_State *L, const char *name, | |||
602 | 602 | ||
603 | static void base_open (lua_State *L) { | 603 | static void base_open (lua_State *L) { |
604 | lua_pushvalue(L, LUA_GLOBALSINDEX); | 604 | lua_pushvalue(L, LUA_GLOBALSINDEX); |
605 | luaL_openlib(L, NULL, base_funcs, 0); /* open lib into global table */ | 605 | luaL_register(L, NULL, base_funcs); /* open lib into global table */ |
606 | lua_pushliteral(L, LUA_VERSION); | 606 | lua_pushliteral(L, LUA_VERSION); |
607 | lua_setglobal(L, "_VERSION"); /* set global _VERSION */ | 607 | lua_setglobal(L, "_VERSION"); /* set global _VERSION */ |
608 | /* `ipairs' and `pairs' need auxiliary functions as upvalues */ | 608 | /* `ipairs' and `pairs' need auxiliary functions as upvalues */ |
@@ -627,7 +627,7 @@ static void base_open (lua_State *L) { | |||
627 | 627 | ||
628 | LUALIB_API int luaopen_base (lua_State *L) { | 628 | LUALIB_API int luaopen_base (lua_State *L) { |
629 | base_open(L); | 629 | base_open(L); |
630 | luaL_openlib(L, LUA_COLIBNAME, co_funcs, 0); | 630 | luaL_register(L, LUA_COLIBNAME, co_funcs); |
631 | return 2; | 631 | return 2; |
632 | } | 632 | } |
633 | 633 | ||