summaryrefslogtreecommitdiff
path: root/src/lj_cconv.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_cconv.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_cconv.c')
-rw-r--r--src/lj_cconv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_cconv.c b/src/lj_cconv.c
index 7b32e35d..c39da333 100644
--- a/src/lj_cconv.c
+++ b/src/lj_cconv.c
@@ -515,7 +515,8 @@ static void cconv_substruct_tab(CTState *cts, CType *d, uint8_t *dp,
515 lj_cconv_bf_tv(cts, df, dp+df->size, tv); 515 lj_cconv_bf_tv(cts, df, dp+df->size, tv);
516 if ((d->info & CTF_UNION)) break; 516 if ((d->info & CTF_UNION)) break;
517 } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) { 517 } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) {
518 cconv_substruct_tab(cts, ctype_child(cts, df), dp+df->size, t, ip, flags); 518 cconv_substruct_tab(cts, ctype_rawchild(cts, df),
519 dp+df->size, t, ip, flags);
519 } /* Ignore all other entries in the chain. */ 520 } /* Ignore all other entries in the chain. */
520 } 521 }
521} 522}
@@ -699,7 +700,8 @@ static void cconv_substruct_init(CTState *cts, CType *d, uint8_t *dp,
699 lj_cconv_bf_tv(cts, df, dp+df->size, o + i); 700 lj_cconv_bf_tv(cts, df, dp+df->size, o + i);
700 if ((d->info & CTF_UNION)) break; 701 if ((d->info & CTF_UNION)) break;
701 } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) { 702 } else if (ctype_isxattrib(df->info, CTA_SUBTYPE)) {
702 cconv_substruct_init(cts, ctype_child(cts, df), dp+df->size, o, len, ip); 703 cconv_substruct_init(cts, ctype_rawchild(cts, df),
704 dp+df->size, o, len, ip);
703 } /* Ignore all other entries in the chain. */ 705 } /* Ignore all other entries in the chain. */
704 } 706 }
705} 707}