- CYSetProperty(context, global, "ffi", JSObjectMakeConstructor(context, ffi_, &ffi));
- CYSetProperty(context, global, "obc", JSObjectMake(context, obc, NULL));
-
-#define CYSetFunction_(name, type) \
- CYSetProperty(context, global, #name, CYMakeFunction(context, reinterpret_cast<void (*)()>(&name), type))
-
- CYSetFunction_(class_addIvar, "B#*LC*");
- CYSetFunction_(class_addMethod, "B#:^?*");
- CYSetFunction_(class_addProtocol, "B#@");
- CYSetFunction_(class_conformsToProtocol, "B#@");
- CYSetFunction_(class_copyIvarList, "^^{objc_ivar=}#^I");
- CYSetFunction_(class_copyMethodList, "^^{objc_method=}#^I");
- CYSetFunction_(class_copyPropertyList, "^^{objc_property=}#^I");
- CYSetFunction_(class_copyProtocolList, "^@#^I");
- CYSetFunction_(class_createInstance, "@#L");
- CYSetFunction_(class_getClassMethod, "^{objc_method=}#:");
- CYSetFunction_(class_getClassVariable, "^{objc_ivar=}#*");
- CYSetFunction_(class_getInstanceMethod, "^{objc_method=}#:");
- CYSetFunction_(class_getInstanceSize, "L#");
- CYSetFunction_(class_getInstanceVariable, "^{objc_ivar=}#*");
- CYSetFunction_(class_getIvarLayout, "*#");
- CYSetFunction_(class_getMethodImplementation, "^?#:");
- CYSetFunction_(class_getMethodImplementation_stret, "^?#:");
- CYSetFunction_(class_getName, "*#");
- CYSetFunction_(class_getProperty, "^{objc_property=}#*");
- CYSetFunction_(class_getSuperclass, "##");
- CYSetFunction_(class_getVersion, "i#");
- CYSetFunction_(class_getWeakIvarLayout, "*#");
- CYSetFunction_(class_isMetaClass, "B#");
- CYSetFunction_(class_replaceMethod, "^?#:^?*");
- CYSetFunction_(class_respondsToSelector, "B#:");
- CYSetFunction_(class_setIvarLayout, "v#*");
- CYSetFunction_(class_setSuperclass, "###");
- CYSetFunction_(class_setVersion, "v#i");
- CYSetFunction_(class_setWeakIvarLayout, "v#*");
- CYSetFunction_(ivar_getName, "*^{objc_ivar=}");
- CYSetFunction_(ivar_getOffset, "i^{objc_ivar=}");
- CYSetFunction_(ivar_getTypeEncoding, "*^{objc_ivar=}");
- CYSetFunction_(method_copyArgumentType, "^c^{objc_method=}I");
- CYSetFunction_(method_copyReturnType, "^c^{objc_method=}");
- CYSetFunction_(method_exchangeImplementations, "v^{objc_method=}^{objc_method=}");
- CYSetFunction_(method_getArgumentType, "v^{objc_method=}I^cL");
- CYSetFunction_(method_getImplementation, "^?^{objc_method=}");
- CYSetFunction_(method_getName, ":^{objc_method=}");
- CYSetFunction_(method_getNumberOfArguments, "I^{objc_method=}");
- CYSetFunction_(method_getReturnType, "v^{objc_method=}^cL");
- CYSetFunction_(method_getTypeEncoding, "*^{objc_method=}");
- CYSetFunction_(method_setImplementation, "^?^{objc_method=}^?");
- CYSetFunction_(objc_allocateClassPair, "##*L");
- CYSetFunction_(objc_copyProtocolList, "^@^I");
- CYSetFunction_(objc_duplicateClass, "##*L");
- CYSetFunction_(objc_getClass, "#*");
- CYSetFunction_(objc_getClassList, "i^#i");
- CYSetFunction_(objc_getFutureClass, "#*");
- CYSetFunction_(objc_getMetaClass, "@*");
- CYSetFunction_(objc_getProtocol, "@*");
- CYSetFunction_(objc_getRequiredClass, "@*");
- CYSetFunction_(objc_lookUpClass, "@*");
- CYSetFunction_(objc_registerClassPair, "v#");
- CYSetFunction_(objc_setFutureClass, "v#*");
- CYSetFunction_(object_copy, "@@L");
- CYSetFunction_(object_dispose, "@@");
- CYSetFunction_(object_getClass, "#@");
- CYSetFunction_(object_getClassName, "*@");
- CYSetFunction_(object_getIndexedIvars, "^v@");
- CYSetFunction_(object_getInstanceVariable, "^{objc_ivar=}@*^^v");
- CYSetFunction_(object_getIvar, "@@^{objc_ivar=}");
- CYSetFunction_(object_setClass, "#@#");
- CYSetFunction_(object_setInstanceVariable, "^{objc_ivar=}@*^v");
- CYSetFunction_(object_setIvar, "v@^{objc_ivar=}@");
- CYSetFunction_(property_getAttributes, "*^{objc_property=}");
- CYSetFunction_(property_getName, "*^{objc_property=}");
- CYSetFunction_(protocol_conformsToProtocol, "B@@");
- CYSetFunction_(protocol_copyMethodDescriptionList, "^{objc_method_description=:*}@BB^I");
- CYSetFunction_(protocol_copyPropertyList, "^{objc_property=}@^I");
- CYSetFunction_(protocol_copyProtocolList, "^@@^I");
- CYSetFunction_(protocol_getMethodDescription, "{objc_method_description=:*}@:BB");
- CYSetFunction_(protocol_getName, "*@");
- CYSetFunction_(protocol_getProperty, "^{objc_property=}@*BB");
- CYSetFunction_(protocol_isEqual, "B@@");
- CYSetFunction_(sel_getName, "*:");
- CYSetFunction_(sel_getUid, ":*");
- CYSetFunction_(sel_isEqual, "B::");
- CYSetFunction_(sel_registerName, ":*");