From 44101c64e86d5e3835dd11cf7a7b9d3e40ba3171 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 11 Dec 2010 20:10:52 +0100 Subject: [PATCH] FFI: Don't use KNULL for arbitrary NULL pointers. --- src/lj_crecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 314e0de7..d6be897e 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -274,7 +274,7 @@ static void crec_ct_tv(jit_State *J, CType *d, TRef dp, TRef sp, TValue *sval) sp = lj_ir_kint(J, tref_istrue(sp) ? 1 : 0); sid = CTID_BOOL; } else if (tref_isnil(sp)) { - sp = lj_ir_knull(J, IRT_PTR); + sp = lj_ir_kptr(J, NULL); } else if (tref_isudata(sp)) { sp = emitir(IRT(IR_ADD, IRT_P32), sp, lj_ir_kint(J, sizeof(GCcdata))); } else { /* NYI: tref_isstr(sp), tref_istab(sp), tref_islightud(sp). */