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

github.com/facebook/luaffifb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ffi.c
diff options
context:
space:
mode:
authorJustin Cormack <justin@specialbusservice.com>2013-11-05 01:55:22 +0400
committerJustin Cormack <justin@specialbusservice.com>2013-11-05 01:55:22 +0400
commit4da54256dfa9787ccbee02c1accc534a735638b9 (patch)
treea525d934515ed619d1c1fce338961aa7cdabc236 /ffi.c
parentda5222bcba296bf6dfa9a21c42a96b030c88d4f0 (diff)
fix pointer types so they call metatypes; also a Lua stack error the test found
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index 1b37c8f..70c621d 100644
--- a/ffi.c
+++ b/ffi.c
@@ -1407,7 +1407,7 @@ static int ffi_metatype(lua_State* L)
* the stack, otherwise it returns 0 and pushes nothing */
int push_user_mt(lua_State* L, int ct_usr, const struct ctype* ct)
{
- if (ct->pointers || (ct->type != STRUCT_TYPE && ct->type != UNION_TYPE)) {
+ if (ct->type != STRUCT_TYPE && ct->type != UNION_TYPE) {
return 0;
}
@@ -1816,6 +1816,7 @@ static int call_user_op(lua_State* L, const char* opfield, int idx, int ct_usr,
lua_call(L, 1, LUA_MULTRET);
return lua_gettop(L) - top + 1;
}
+ lua_pop(L, 2);
}
return -1;
}