diff options
author | Mike Pall <mike> | 2010-12-11 20:10:52 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-12-11 20:12:14 +0100 |
commit | 44101c64e86d5e3835dd11cf7a7b9d3e40ba3171 (patch) | |
tree | 42e2917732e8fb579bc3da418698bb3188db76f9 | |
parent | cdac0fa2cbd3f610159330bd8c5a36ea53b631d7 (diff) | |
download | luajit-44101c64e86d5e3835dd11cf7a7b9d3e40ba3171.tar.gz luajit-44101c64e86d5e3835dd11cf7a7b9d3e40ba3171.tar.bz2 luajit-44101c64e86d5e3835dd11cf7a7b9d3e40ba3171.zip |
FFI: Don't use KNULL for arbitrary NULL pointers.
-rw-r--r-- | src/lj_crecord.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
274 | sp = lj_ir_kint(J, tref_istrue(sp) ? 1 : 0); | 274 | sp = lj_ir_kint(J, tref_istrue(sp) ? 1 : 0); |
275 | sid = CTID_BOOL; | 275 | sid = CTID_BOOL; |
276 | } else if (tref_isnil(sp)) { | 276 | } else if (tref_isnil(sp)) { |
277 | sp = lj_ir_knull(J, IRT_PTR); | 277 | sp = lj_ir_kptr(J, NULL); |
278 | } else if (tref_isudata(sp)) { | 278 | } else if (tref_isudata(sp)) { |
279 | sp = emitir(IRT(IR_ADD, IRT_P32), sp, lj_ir_kint(J, sizeof(GCcdata))); | 279 | sp = emitir(IRT(IR_ADD, IRT_P32), sp, lj_ir_kint(J, sizeof(GCcdata))); |
280 | } else { /* NYI: tref_isstr(sp), tref_istab(sp), tref_islightud(sp). */ | 280 | } else { /* NYI: tref_isstr(sp), tref_istab(sp), tref_islightud(sp). */ |