[lua] Fix garbage collectors

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-06-04 18:17:47 +02:00
parent 05ef68a4c4
commit 0a44e90cb6
5 changed files with 5 additions and 0 deletions

View File

@ -127,6 +127,7 @@ luaA_keybinding_gc(lua_State *L)
{ {
keybinding_t **keybinding = luaL_checkudata(L, 1, "keybinding"); keybinding_t **keybinding = luaL_checkudata(L, 1, "keybinding");
keybinding_unref(keybinding); keybinding_unref(keybinding);
keybinding = NULL;
return 0; return 0;
} }

View File

@ -503,6 +503,7 @@ luaA_statusbar_gc(lua_State *L)
{ {
statusbar_t **sb = luaL_checkudata(L, 1, "statusbar"); statusbar_t **sb = luaL_checkudata(L, 1, "statusbar");
statusbar_unref(sb); statusbar_unref(sb);
*sb = NULL;
return 0; return 0;
} }

1
tag.c
View File

@ -484,6 +484,7 @@ luaA_tag_gc(lua_State *L)
{ {
tag_t **tag = luaL_checkudata(L, 1, "tag"); tag_t **tag = luaL_checkudata(L, 1, "tag");
tag_unref(tag); tag_unref(tag);
*tag = NULL;
return 0; return 0;
} }

View File

@ -527,6 +527,7 @@ luaA_titlebar_gc(lua_State *L)
{ {
titlebar_t **titlebar = luaL_checkudata(L, 1, "titlebar"); titlebar_t **titlebar = luaL_checkudata(L, 1, "titlebar");
titlebar_unref(titlebar); titlebar_unref(titlebar);
*titlebar = NULL;
return 0; return 0;
} }

View File

@ -438,6 +438,7 @@ luaA_widget_gc(lua_State *L)
{ {
widget_t **widget = luaL_checkudata(L, 1, "widget"); widget_t **widget = luaL_checkudata(L, 1, "widget");
widget_unref(widget); widget_unref(widget);
*widget = NULL;
return 0; return 0;
} }