]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Library.mm
Avoid duplicating calls for getting type encoding.
[cycript.git] / ObjectiveC / Library.mm
index 4eec80b28fc8e6f44c9124af38c285bf060f31bb..c486fed8a51afdde725a0e5dacf29a1666637acd 100644 (file)
@@ -2086,7 +2086,7 @@ static JSValueRef Internal_getProperty(JSContextRef context, JSObjectRef object,
             uintptr_t mask((1 << length) - 1);
             return CYCastJSValue(context, (field >> shift) & mask);
         } else {
-            auto type(new(pool) Type_privateData(ivar_getTypeEncoding(ivar)));
+            auto type(new(pool) Type_privateData(encoding));
             return CYFromFFI(context, type->type_, type->GetFFI(), data);
         }
     }