mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
FFI: Convert enum return value of C function to underlying type.
This commit is contained in:
parent
a285415b01
commit
30db71e2e2
@ -408,6 +408,7 @@ static int ccall_get_results(lua_State *L, CTState *cts, CType *ct,
|
|||||||
#endif
|
#endif
|
||||||
/* No reference types end up here, so there's no need for the CTypeID. */
|
/* No reference types end up here, so there's no need for the CTypeID. */
|
||||||
lua_assert(!(ctype_isrefarray(ctr->info) || ctype_isstruct(ctr->info)));
|
lua_assert(!(ctype_isrefarray(ctr->info) || ctype_isstruct(ctr->info)));
|
||||||
|
if (ctype_isenum(ctr->info)) ctr = ctype_child(cts, ctr);
|
||||||
return lj_cconv_tv_ct(cts, ctr, 0, L->top-1, (uint8_t *)sp);
|
return lj_cconv_tv_ct(cts, ctr, 0, L->top-1, (uint8_t *)sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user