static JSValueRef CYCallFunction(JSContextRef context, size_t count, const JSValueRef *arguments, JSValueRef *exception, sig::Signature *signature, ffi_cif *cif, void (*function)()) {
@try {
static JSValueRef CYCallFunction(JSContextRef context, size_t count, const JSValueRef *arguments, JSValueRef *exception, sig::Signature *signature, ffi_cif *cif, void (*function)()) {
@try {
}
static JSValueRef $objc_msgSend(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { _pooled
}
static JSValueRef $objc_msgSend(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { _pooled
id self(CYCastNSObject(context, arguments[0]));
if (self == nil)
return JSValueMakeNull(context);
id self(CYCastNSObject(context, arguments[0]));
if (self == nil)
return JSValueMakeNull(context);
static JSValueRef ffi_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
ffiData *data(reinterpret_cast<ffiData *>(JSObjectGetPrivate(object)));
static JSValueRef ffi_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
ffiData *data(reinterpret_cast<ffiData *>(JSObjectGetPrivate(object)));
return CYCallFunction(context, count, arguments, exception, &data->signature_, &data->cif_, data->function_);
}
return CYCallFunction(context, count, arguments, exception, &data->signature_, &data->cif_, data->function_);
}
CYSetProperty(context, global, "objc_msgSend", JSObjectMakeFunctionWithCallback(context, CYString("objc_msgSend"), &$objc_msgSend));
CYSetProperty(context, global, "YES", JSValueMakeBoolean(context, true));
CYSetProperty(context, global, "objc_msgSend", JSObjectMakeFunctionWithCallback(context, CYString("objc_msgSend"), &$objc_msgSend));
CYSetProperty(context, global, "YES", JSValueMakeBoolean(context, true));
- CYSetProperty(context, global, "NO", JSValueMakeBoolean(context, true));
+ CYSetProperty(context, global, "NO", JSValueMakeBoolean(context, false));
CYSetProperty(context, global, "nil", JSValueMakeNull(context));
name_ = JSStringCreateWithUTF8CString("name");
CYSetProperty(context, global, "nil", JSValueMakeNull(context));
name_ = JSStringCreateWithUTF8CString("name");