From: Mike Pall Date: Mon, 7 Feb 2011 15:41:51 +0000 (+0100) Subject: FFI: Fix handling of enum arguments to C calls. X-Git-Tag: v2.0.0-beta6~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8da287cab809adbc29b8750345773f7f901a7a27;p=thirdparty%2FLuaJIT.git FFI: Fix handling of enum arguments to C calls. --- diff --git a/src/lj_crecord.c b/src/lj_crecord.c index b7b3855f..8473ee45 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -687,8 +687,8 @@ static TRef crec_call_args(jit_State *J, RecordFFData *rd, if (!ctype_isfield(ct->info)) lj_trace_err(J, LJ_TRERR_NYICALL); d = ctype_rawchild(cts, ct); - if (ctype_isenum(d->info)) d = ctype_child(cts, d); - if (!(ctype_isnum(d->info) || ctype_isptr(d->info))) + if (!(ctype_isnum(d->info) || ctype_isptr(d->info) || + ctype_isenum(d->info))) lj_trace_err(J, LJ_TRERR_NYICALL); args[n] = crec_ct_tv(J, d, 0, J->base[n+1], &rd->argv[n+1]); }