IVogel 2 years ago
parent
commit
04d87f4fc2
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/lib.rs

+ 1 - 3
src/lib.rs

@@ -512,8 +512,6 @@ where
         pushcclosure(state, cleanup_callback::<FUNC>, 0);
         pushcclosure(state, cleanup_callback::<FUNC>, 0);
         setfield(state, -2, cstr!("__gc"));
         setfield(state, -2, cstr!("__gc"));
         setmetatable(state, -2);
         setmetatable(state, -2);
-        pushcclosure(state, call_callback::<FUNC>, 1);
-    } else {
-        pushcclosure(state, call_callback::<FUNC>, 0);
     }
     }
+    pushcclosure(state, call_callback::<FUNC>, 1);
 }
 }