FFI: Simplify initializer rules. Clarify docs.

This commit is contained in:
Mike Pall
2011-01-23 14:23:21 +01:00
parent f529d22869
commit 72b3fff72f
6 changed files with 58 additions and 33 deletions

View File

@@ -566,8 +566,7 @@ static void crec_alloc(jit_State *J, RecordFFData *rd, CTypeID id)
CType *d = ctype_raw(cts, id);
TRef trcd = emitir(IRTG(IR_CNEW, IRT_CDATA), trid, TREF_NIL);
J->base[0] = trcd;
if (J->base[1] && !J->base[2] &&
!lj_cconv_multi_init(cts, d, &rd->argv[1])) {
if (J->base[1] && !J->base[2] && !lj_cconv_multi_init(d, &rd->argv[1])) {
goto single_init;
} else if (ctype_isarray(d->info)) {
CType *dc = ctype_rawchild(cts, d); /* Array element type. */