diff options
Diffstat (limited to 'loadlib.c')
-rw-r--r-- | loadlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loadlib.c,v 1.85 2010/06/18 17:23:02 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.86 2010/06/30 17:40:27 roberto Exp roberto $ |
3 | ** Dynamic library loader for Lua | 3 | ** Dynamic library loader for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | ** | 5 | ** |
@@ -616,7 +616,7 @@ LUAMOD_API int luaopen_package (lua_State *L) { | |||
616 | lua_pushcfunction(L, gctm); | 616 | lua_pushcfunction(L, gctm); |
617 | lua_setfield(L, -2, "__gc"); | 617 | lua_setfield(L, -2, "__gc"); |
618 | /* create `package' table */ | 618 | /* create `package' table */ |
619 | luaL_register(L, LUA_LOADLIBNAME, pk_funcs); | 619 | luaL_newlib(L, pk_funcs); |
620 | /* create `loaders' table */ | 620 | /* create `loaders' table */ |
621 | lua_createtable(L, sizeof(loaders)/sizeof(loaders[0]) - 1, 0); | 621 | lua_createtable(L, sizeof(loaders)/sizeof(loaders[0]) - 1, 0); |
622 | /* fill it with pre-defined loaders */ | 622 | /* fill it with pre-defined loaders */ |