void Aggregate::PoolFFI(CYPool *pool, JSContextRef context, ffi_type *ffi, void *data, JSValueRef value) const {
_assert(!overlap);
+ size_t offset(0);
uint8_t *base(reinterpret_cast<uint8_t *>(data));
JSObjectRef aggregate(JSValueIsObject(context, value) ? (JSObjectRef) value : NULL);
for (size_t index(0); index != signature.count; ++index) {
}
}
- element->type->PoolFFI(pool, context, field, base, rhs);
- base += field->size;
+ element->type->PoolFFI(pool, context, field, base + offset, rhs);
+ offset += field->size;
+ CYAlign(offset, field->alignment);
}
}