From: Jay Freeman (saurik) Date: Wed, 4 Nov 2015 08:30:56 +0000 (-0800) Subject: Avoid duplicating calls for getting type encoding. X-Git-Tag: v0.9.504~20 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/d2743081b16406a557258a8615905b360c59b96b Avoid duplicating calls for getting type encoding. --- diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index 4eec80b..c486fed 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -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); } }