internal->value_ = data;
else {
size_t size(typical->GetFFI()->size);
- void *copy((*internal->pool_)(size));
+ void *copy(internal->pool_->malloc<void>(size));
memcpy(copy, data, size);
internal->value_ = copy;
}
static JSValueRef $cyq(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
CYPool pool;
- const char *name(pool.sprintf("%s%"APR_SIZE_T_FMT"", CYPoolCString(pool, context, arguments[0]), Nonce_++));
+ const char *name(pool.strcat(CYPoolCString(pool, context, arguments[0]), pool.itoa(Nonce_++), NULL));
return CYCastJSValue(context, name);
}
const char *type(sig::Unparse(pool, internal->type_));
std::ostringstream str;
CYStringify(str, type, strlen(type));
- char *cyon(apr_pstrcat(pool, "new Type(", str.str().c_str(), ")", NULL));
+ char *cyon(pool.strcat("new Type(", str.str().c_str(), ")", NULL));
return CYCastJSValue(context, CYJSString(cyon));
} CYCatch(NULL) }
initialized_ = true;
else return;
- CYInitializeStatic();
-
JSObjectMakeArray$ = reinterpret_cast<JSObjectRef (*)(JSContextRef, size_t, const JSValueRef[], JSValueRef *)>(dlsym(RTLD_DEFAULT, "JSObjectMakeArray"));
JSClassDefinition definition;
va_list args;
va_start(args, format);
- const char *message(pool.vsprintf(format, args));
+ // XXX: there might be a beter way to think about this
+ const char *message(pool.vsprintf(64, format, args));
va_end(args);
value_ = CYCastJSError(context, message);