return CYMakeType(context, &type);
} CYCatch }
+static JSValueRef Type_callAsFunction_constant(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry {
+ if (count != 0)
+ throw CYJSError(context, "incorrect number of arguments to Type.constant");
+ Type_privateData *internal(reinterpret_cast<Type_privateData *>(JSObjectGetPrivate(_this)));
+
+ sig::Type type(*internal->type_);
+ type.flags |= JOC_TYPE_CONST;
+ return CYMakeType(context, &type);
+} CYCatch }
+
static JSValueRef Type_callAsFunction_pointerTo(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry {
if (count != 0)
throw CYJSError(context, "incorrect number of arguments to Type.pointerTo");
{NULL, NULL, NULL, 0}
};
-static JSStaticFunction Type_staticFunctions[6] = {
+static JSStaticFunction Type_staticFunctions[7] = {
{"arrayOf", &Type_callAsFunction_arrayOf, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
+ {"constant", &Type_callAsFunction_constant, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"pointerTo", &Type_callAsFunction_pointerTo, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toCYON", &Type_callAsFunction_toCYON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toJSON", &Type_callAsFunction_toJSON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
cycript -p with processes that have spaces doesn't work
CYDriver uses std::istream, but it should use std::streambuf
the mechanism I used to autodetect readline is horrible: use autoconf
+
+constant flags on types are encoded using something horribly wrong
+http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
+http://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html
+http://gcc.gnu.org/onlinedocs/gcc/Legacy-type-encoding.html