- Type_privateData(apr_pool_t *pool, const char *type) :
- ffi_(NULL)
- {
- _assert(pool != NULL);
- pool_ = pool;
- sig::Signature signature;
- sig::Parse(pool_, &signature, type, &Structor_);
- type_ = signature.elements[0].type;
+ template <typename... Args_>
+ static JSObjectRef Make(JSContextRef context, Args_ &&... args) {
+ Internal_ *internal(new Internal_(cy::Forward<Args_>(args)...));
+ JSObjectRef object(JSObjectMake(context, Internal_::GetClass(cy::Forward<Args_>(args)...), internal));
+ if (JSValueRef prototype = internal->GetPrototype(context))
+ CYSetPrototype(context, object, prototype);
+ return object;