summaryrefslogtreecommitdiff
path: root/src/lj_ccall.c
diff options
context:
space:
mode:
authorMike Pall <mike>2013-02-03 11:51:19 +0100
committerMike Pall <mike>2013-02-03 11:51:19 +0100
commitfe9934feea0a8d580de19389f1a54d6cd4563d6b (patch)
treedf5f18a64130edfac961b7e12586f008b62dc640 /src/lj_ccall.c
parent4eb4b8ab8471233d63ae9644cdf304b847b3bbdc (diff)
downloadluajit-fe9934feea0a8d580de19389f1a54d6cd4563d6b.tar.gz
luajit-fe9934feea0a8d580de19389f1a54d6cd4563d6b.tar.bz2
luajit-fe9934feea0a8d580de19389f1a54d6cd4563d6b.zip
FFI: Fix handling of qualified transparent structs/unions.
Diffstat (limited to 'src/lj_ccall.c')
-rw-r--r--src/lj_ccall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_ccall.c b/src/lj_ccall.c
index 392012ff..5a905ca7 100644
--- a/src/lj_ccall.c
+++ b/src/lj_ccall.c
@@ -457,7 +457,7 @@ static int ccall_classify_struct(CTState *cts, CType *ct, int *rcl, CTSize ofs)
457 else if (ctype_isbitfield(ct->info)) 457 else if (ctype_isbitfield(ct->info))
458 rcl[(fofs >= 8)] |= CCALL_RCL_INT; /* NYI: unaligned bitfields? */ 458 rcl[(fofs >= 8)] |= CCALL_RCL_INT; /* NYI: unaligned bitfields? */
459 else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) 459 else if (ctype_isxattrib(ct->info, CTA_SUBTYPE))
460 ccall_classify_struct(cts, ctype_child(cts, ct), rcl, fofs); 460 ccall_classify_struct(cts, ctype_rawchild(cts, ct), rcl, fofs);
461 } 461 }
462 return ((rcl[0]|rcl[1]) & CCALL_RCL_MEM); /* Memory class? */ 462 return ((rcl[0]|rcl[1]) & CCALL_RCL_MEM); /* Memory class? */
463} 463}
@@ -541,7 +541,7 @@ static unsigned int ccall_classify_struct(CTState *cts, CType *ct, CType *ctf)
541 } else if (ctype_isbitfield(ct->info)) { 541 } else if (ctype_isbitfield(ct->info)) {
542 goto noth; 542 goto noth;
543 } else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) { 543 } else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) {
544 CType *sct = ctype_child(cts, ct); 544 CType *sct = ctype_rawchild(cts, ct);
545 if (sct->size > 0) { 545 if (sct->size > 0) {
546 unsigned int s = ccall_classify_struct(cts, sct, ctf); 546 unsigned int s = ccall_classify_struct(cts, sct, ctf);
547 if (s <= 1) goto noth; 547 if (s <= 1) goto noth;