diff options
author | Justin Cormack <justin@specialbusservice.com> | 2013-11-05 01:55:22 +0400 |
---|---|---|
committer | Justin Cormack <justin@specialbusservice.com> | 2013-11-05 01:55:22 +0400 |
commit | 4da54256dfa9787ccbee02c1accc534a735638b9 (patch) | |
tree | a525d934515ed619d1c1fce338961aa7cdabc236 /ffi.c | |
parent | da5222bcba296bf6dfa9a21c42a96b030c88d4f0 (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |