aboutsummaryrefslogtreecommitdiff
path: root/loadlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'loadlib.c')
-rw-r--r--loadlib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/loadlib.c b/loadlib.c
index c9c1dff9..39e98907 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.91 2010/09/07 19:21:39 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.92 2010/10/29 14:35:09 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**
@@ -239,8 +239,7 @@ static void **ll_register (lua_State *L, const char *path) {
239 lua_pop(L, 1); /* remove result from gettable */ 239 lua_pop(L, 1); /* remove result from gettable */
240 plib = (void **)lua_newuserdata(L, sizeof(const void *)); 240 plib = (void **)lua_newuserdata(L, sizeof(const void *));
241 *plib = NULL; 241 *plib = NULL;
242 luaL_getmetatable(L, "_LOADLIB"); 242 luaL_setmetatable(L, "_LOADLIB");
243 lua_setmetatable(L, -2);
244 lua_pushfstring(L, "%s%s", LIBPREFIX, path); 243 lua_pushfstring(L, "%s%s", LIBPREFIX, path);
245 lua_pushvalue(L, -2); 244 lua_pushvalue(L, -2);
246 lua_settable(L, LUA_REGISTRYINDEX); 245 lua_settable(L, LUA_REGISTRYINDEX);