Fix rpm.unregister() Lua extension
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 26 Jun 2009 13:07:50 +0000 (16:07 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Jul 2009 06:43:11 +0000 (09:43 +0300)
- hook data is userdata, not light userdata
(cherry picked from commit d1b399761ffe554f3f3c4ced187c3b8ec58233fb)

rpmio/rpmlua.c

index 133fa16..0b49dfa 100644 (file)
@@ -662,7 +662,7 @@ static int rpm_unregister(lua_State *L)
 {
     if (!lua_isstring(L, 1)) {
        (void) luaL_argerror(L, 1, "hook name expected");
-    } else if (!lua_islightuserdata(L, 2)) {
+    } else if (!lua_isuserdata(L, 2)) {
        (void) luaL_argerror(L, 2, "hook information expected");
     } else {
        rpmluaHookData hookdata = (rpmluaHookData)lua_touserdata(L, 2);