]> git.saurik.com Git - cycript.git/commitdiff
Worked around an incorrect warning exposed by the optimizer on Linux: stack allocatin...
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 4 Nov 2009 03:14:22 +0000 (03:14 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 4 Nov 2009 03:14:22 +0000 (03:14 +0000)
Internal.hpp
ObjectiveC/Library.mm

index fff510bd97455efe3767b19289fa7934de7ee3a8..13987d4b25789eb2098eecff8990a279ff3ca446 100644 (file)
@@ -67,9 +67,16 @@ struct Type_privateData :
     Type_privateData(apr_pool_t *pool, const char *type) :
         ffi_(NULL)
     {
-        if (pool != NULL)
-            pool_ = pool;
+        _assert(pool != NULL);
+        pool_ = pool;
+        sig::Signature signature;
+        sig::Parse(pool_, &signature, type, &Structor_);
+        type_ = signature.elements[0].type;
+    }
 
+    Type_privateData(const char *type) :
+        ffi_(NULL)
+    {
         sig::Signature signature;
         sig::Parse(pool_, &signature, type, &Structor_);
         type_ = signature.elements[0].type;
index 9c7bcc1dc3bce6957e480feeabf42dac5a7edf70..f578112179051bc2f21d0a724a4652d8cd27a46e 100644 (file)
@@ -2239,8 +2239,8 @@ void CYObjectiveC_SetupContext(JSContextRef context) {
     JSObjectRef global(CYGetGlobalObject(context));
     apr_pool_t *pool(CYGetGlobalPool());
 
-    Object_type = new(pool) Type_privateData(pool, "@");
-    Selector_type = new(pool) Type_privateData(pool, ":");
+    Object_type = new(pool) Type_privateData("@");
+    Selector_type = new(pool) Type_privateData(":");
 
 #ifdef __APPLE__
     NSCFBoolean_ = objc_getClass("NSCFBoolean");