diff options
author | Leon Bottou <leon@bottou.org> | 2014-08-01 01:39:19 +0400 |
---|---|---|
committer | Leon Bottou <leon@bottou.org> | 2014-08-01 01:47:12 +0400 |
commit | eed12cca8d978b0dbfcf0eae2c3d0047617954a6 (patch) | |
tree | 5cbcefd1b3b71035686da1cbe87af825bec89ec1 | |
parent | 7972e39317776c624356568c87e76734a5618938 (diff) |
Fix luaQ_pushqt to work with luajit weak tables
-rw-r--r-- | qtlua/qtluaengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qtlua/qtluaengine.cpp b/qtlua/qtluaengine.cpp index 1fe1449..535ad22 100644 --- a/qtlua/qtluaengine.cpp +++ b/qtlua/qtluaengine.cpp @@ -2645,7 +2645,7 @@ luaQ_pushqt(lua_State *L, QObject *obj, bool owned) lua_pushlightuserdata(L, (void*)obj); lua_rawget(L, -2); // ..stack: objecttable object - if (lua_isuserdata(L, -1)) + if (lua_isuserdata(L, -1) && luaQ_toqobject(L, -1) == obj) { lua_remove(L, -2); } |