Remove StringInstance class (but keep constructor).
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jun 2012 19:24:02 +0000 (12:24 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jun 2012 19:24:02 +0000 (12:24 -0700)
ObjectiveC/Library.mm

index 447a6feffa074adc4e5920a2820f126f55193d4c..05ed9ce4138dfc38f85ee0c914031b920498622c 100644 (file)
@@ -238,7 +238,6 @@ static JSClassRef Internal_;
 static JSClassRef Message_;
 static JSClassRef Messages_;
 static JSClassRef Selector_;
-static JSClassRef StringInstance_;
 static JSClassRef Super_;
 
 static JSClassRef ObjectiveC_Classes_;
@@ -2380,12 +2379,6 @@ static JSStaticFunction Selector_staticFunctions[5] = {
     {NULL, NULL, 0}
 };
 
-static JSStaticFunction StringInstance_staticFunctions[2] = {
-    //{"valueOf", &Instance_callAsFunction_valueOf, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
-    {"toString", &Instance_callAsFunction_toString, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
-    {NULL, NULL, 0}
-};
-
 void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry {
     apr_pool_t *pool(CYGetGlobalPool());
 
@@ -2460,11 +2453,6 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry {
     definition.finalize = &CYFinalize;
     Selector_ = JSClassCreate(&definition);
 
-    definition = kJSClassDefinitionEmpty;
-    definition.className = "StringInstance";
-    definition.staticFunctions = StringInstance_staticFunctions;
-    StringInstance_ = JSClassCreate(&definition);
-
     definition = kJSClassDefinitionEmpty;
     definition.className = "Super";
     definition.staticFunctions = Internal_staticFunctions;
@@ -2541,7 +2529,7 @@ void CYObjectiveC_SetupContext(JSContextRef context) { CYPoolTry {
     JSObjectRef Instance(JSObjectMakeConstructor(context, Instance_, &Instance_new));
     JSObjectRef Message(JSObjectMakeConstructor(context, Message_, NULL));
     JSObjectRef Selector(JSObjectMakeConstructor(context, Selector_, &Selector_new));
-    JSObjectRef StringInstance(JSObjectMakeConstructor(context, StringInstance_, NULL));
+    JSObjectRef StringInstance(JSObjectMakeConstructor(context, Instance_, NULL));
     JSObjectRef Super(JSObjectMakeConstructor(context, Super_, &Super_new));
 
     JSObjectRef Instance_prototype(CYCastJSObject(context, CYGetProperty(context, Instance, prototype_s)));