aboutsummaryrefslogtreecommitdiff
path: root/loadlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'loadlib.c')
-rw-r--r--loadlib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/loadlib.c b/loadlib.c
index d50a587a..81d46172 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.37 2005/08/10 18:06:58 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.38 2005/08/15 14:12:32 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**
@@ -289,10 +289,8 @@ static void **ll_register (lua_State *L, const char *path) {
289*/ 289*/
290static int gctm (lua_State *L) { 290static int gctm (lua_State *L) {
291 void **lib = (void **)luaL_checkudata(L, 1, "_LOADLIB"); 291 void **lib = (void **)luaL_checkudata(L, 1, "_LOADLIB");
292 if (lib) { 292 if (*lib) ll_unloadlib(*lib);
293 if (*lib) ll_unloadlib(*lib); 293 *lib = NULL; /* mark library as closed */
294 *lib = NULL; /* mark library as closed */
295 }
296 return 0; 294 return 0;
297} 295}
298 296