- size_t size(typical->GetFFI()->size);
- void *copy(internal->pool_->malloc<void>(size));
- memcpy(copy, data, size);
+ ffi_type *ffi(typical->GetFFI());
+ void *copy(internal->pool_->malloc<void>(ffi->size, ffi->alignment));
+ memcpy(copy, data, ffi->size);
}
type.PoolFFI(pool, context, field, base, rhs);
}
type.PoolFFI(pool, context, field, base, rhs);
}
element->type->PoolFFI(pool, context, field, base, rhs);
}
element->type->PoolFFI(pool, context, field, base, rhs);
for (size_t index(setups); index != size; ++index) {
sig::Element *element(&signature->elements[index + 1]);
ffi_type *ffi(cif->arg_types[index]);
for (size_t index(setups); index != size; ++index) {
sig::Element *element(&signature->elements[index + 1]);
ffi_type *ffi(cif->arg_types[index]);
element->type->PoolFFI(&pool, context, ffi, values[index], arguments[index - setups]);
}
element->type->PoolFFI(&pool, context, ffi, values[index], arguments[index - setups]);
}
if (sig::Function *function = dynamic_cast<sig::Function *>(internal->type_))
return CYMakeFunctor(context, arguments[0], function->signature);
if (sig::Function *function = dynamic_cast<sig::Function *>(internal->type_))
return CYMakeFunctor(context, arguments[0], function->signature);
type->PoolFFI(&pool, context, ffi, value, arguments[0]);
return type->FromFFI(context, ffi, value);
} CYCatch(NULL) }
type->PoolFFI(&pool, context, ffi, value, arguments[0]);
return type->FromFFI(context, ffi, value);
} CYCatch(NULL) }
JSObjectRef pointer(CYMakePointer(context, NULL, length, *type, NULL, NULL));
Pointer *value(reinterpret_cast<Pointer *>(JSObjectGetPrivate(pointer)));
JSObjectRef pointer(CYMakePointer(context, NULL, length, *type, NULL, NULL));
Pointer *value(reinterpret_cast<Pointer *>(JSObjectGetPrivate(pointer)));
- value->value_ = value->pool_->malloc<void>(internal->GetFFI()->size);
- memset(value->value_, 0, internal->GetFFI()->size);
+ ffi_type *ffi(internal->GetFFI());
+ value->value_ = value->pool_->malloc<void>(ffi->size, ffi->alignment);
+ memset(value->value_, 0, ffi->size);