diff options
author | Mike Pall <mike> | 2011-02-23 00:28:49 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2011-02-23 00:28:49 +0100 |
commit | a720db409d547f1b509bb0584ee1570017ebccb8 (patch) | |
tree | 09715091519f22ea3eb36237ca6f9a1acfa08a56 /src | |
parent | 4c97cc773091d3a7b523283b178ab53451583ca4 (diff) | |
download | luajit-a720db409d547f1b509bb0584ee1570017ebccb8.tar.gz luajit-a720db409d547f1b509bb0584ee1570017ebccb8.tar.bz2 luajit-a720db409d547f1b509bb0584ee1570017ebccb8.zip |
FFI: Record calls to functions with void results.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_crecord.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 0120b3eb..5e058a6f 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -707,8 +707,14 @@ static int crec_call(jit_State *J, RecordFFData *rd, GCcdata *cd) | |||
707 | CType *ctr = ctype_rawchild(cts, ct); | 707 | CType *ctr = ctype_rawchild(cts, ct); |
708 | IRType t = crec_ct2irt(ctr); | 708 | IRType t = crec_ct2irt(ctr); |
709 | TRef tr; | 709 | TRef tr; |
710 | if (ctype_isenum(ctr->info)) ctr = ctype_child(cts, ctr); | 710 | if (ctype_isvoid(ctr->info)) { |
711 | if (!(ctype_isnum(ctr->info) || ctype_isptr(ctr->info)) || | 711 | t = IRT_NIL; |
712 | rd->nres = 0; | ||
713 | } else if (ctype_isenum(ctr->info)) { | ||
714 | ctr = ctype_child(cts, ctr); | ||
715 | } | ||
716 | if (!(ctype_isnum(ctr->info) || ctype_isptr(ctr->info) || | ||
717 | ctype_isvoid(ctr->info)) || | ||
712 | ctype_isbool(ctr->info) || (ct->info & CTF_VARARG) || | 718 | ctype_isbool(ctr->info) || (ct->info & CTF_VARARG) || |
713 | #if LJ_TARGET_X86 | 719 | #if LJ_TARGET_X86 |
714 | ctype_cconv(ct->info) != CTCC_CDECL || | 720 | ctype_cconv(ct->info) != CTCC_CDECL || |