FFI: Fix recording of userdata conversions.

This commit is contained in:
Mike Pall 2011-02-20 02:13:32 +01:00
parent cf88c43dd6
commit 34bcf6378b

View File

@ -365,7 +365,7 @@ static TRef crec_ct_tv(jit_State *J, CType *d, TRef dp, TRef sp, TValue *sval)
} else if (tref_isnil(sp)) { } else if (tref_isnil(sp)) {
sp = lj_ir_kptr(J, NULL); sp = lj_ir_kptr(J, NULL);
} else if (tref_isudata(sp)) { } else if (tref_isudata(sp)) {
sp = emitir(IRT(IR_ADD, IRT_P32), sp, lj_ir_kint(J, sizeof(GCcdata))); sp = emitir(IRT(IR_ADD, IRT_P32), sp, lj_ir_kint(J, sizeof(GCudata)));
} else if (tref_isstr(sp)) { } else if (tref_isstr(sp)) {
if (ctype_isenum(d->info)) { /* Match string against enum constant. */ if (ctype_isenum(d->info)) { /* Match string against enum constant. */
GCstr *str = strV(sval); GCstr *str = strV(sval);