aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2011-01-26 14:18:12 +0100
committerMike Pall <mike>2011-01-26 14:18:12 +0100
commit30db71e2e2ee3d12f506297e5c0daddb01ffb2c3 (patch)
treec02354c7ddd97aa65cdc43293c943363253b63d2 /src
parenta285415b01755b8945068976f856af67968a754d (diff)
downloadluajit-30db71e2e2ee3d12f506297e5c0daddb01ffb2c3.tar.gz
luajit-30db71e2e2ee3d12f506297e5c0daddb01ffb2c3.tar.bz2
luajit-30db71e2e2ee3d12f506297e5c0daddb01ffb2c3.zip
FFI: Convert enum return value of C function to underlying type.
Diffstat (limited to 'src')
-rw-r--r--src/lj_ccall.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lj_ccall.c b/src/lj_ccall.c
index 3881ad50..ece775a9 100644
--- a/src/lj_ccall.c
+++ b/src/lj_ccall.c
@@ -408,6 +408,7 @@ static int ccall_get_results(lua_State *L, CTState *cts, CType *ct,
408#endif 408#endif
409 /* No reference types end up here, so there's no need for the CTypeID. */ 409 /* No reference types end up here, so there's no need for the CTypeID. */
410 lua_assert(!(ctype_isrefarray(ctr->info) || ctype_isstruct(ctr->info))); 410 lua_assert(!(ctype_isrefarray(ctr->info) || ctype_isstruct(ctr->info)));
411 if (ctype_isenum(ctr->info)) ctr = ctype_child(cts, ctr);
411 return lj_cconv_tv_ct(cts, ctr, 0, L->top-1, (uint8_t *)sp); 412 return lj_cconv_tv_ct(cts, ctr, 0, L->top-1, (uint8_t *)sp);
412} 413}
413 414