Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/qtlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Bottou <leon@bottou.org>2014-08-01 01:39:19 +0400
committerLeon Bottou <leon@bottou.org>2014-08-01 01:47:12 +0400
commiteed12cca8d978b0dbfcf0eae2c3d0047617954a6 (patch)
tree5cbcefd1b3b71035686da1cbe87af825bec89ec1
parent7972e39317776c624356568c87e76734a5618938 (diff)
Fix luaQ_pushqt to work with luajit weak tables
-rw-r--r--qtlua/qtluaengine.cpp2
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);
}