]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Replace.cpp
Attempt to garbage collect before using choose().
[cycript.git] / ObjectiveC / Replace.cpp
index ec2411b3787c23d4da6914089f34a3adab0583f4..a2a4c114a5c7f43cc941dd07cecdf8cdb9bc4b55 100644 (file)
@@ -112,7 +112,7 @@ CYStatement *CYMessage::Replace(CYContext &context, bool replace) const { $T(NUL
             $V(instance_ ? "$cyc" : "$cym"),
             cyn,
             $N2($V("Functor"), $F(NULL, $P2($L("self"), $L("_cmd"), parameters_->Parameters(context)), $$->*
-                $ CYVar($L1($L("$cyr", $N2($V("Super"), self, _class))))->*
+                $ CYVar($L1($L("$cyr", $N2($V("objc_super"), self, _class))))->*
                 $ CYReturn($C1($M($F(NULL, NULL, code_), $S("call")), self))
             ), cyt),
             cyt
@@ -153,7 +153,7 @@ CYExpression *CYBox::Replace(CYContext &context) {
 }
 
 CYExpression *CYObjCBlock::Replace(CYContext &context) {
-    return $N2($V("Functor"), $ CYFunctionExpression(NULL, $ CYFunctionParameter($ CYDeclaration($ CYIdentifier("$cyt")), parameters_->Parameters(context)), statements_), parameters_->TypeSignature(context, $ CYAdd(typed_->Replace(context), $ CYString("@"))));
+    return $C1($ CYEncodedType(($ CYTypedIdentifier(*typed_))->Modify($ CYTypeBlockWith(parameters_))), $ CYFunctionExpression(NULL, parameters_->Parameters(context), statements_));
 }
 
 CYStatement *CYProtocol::Replace(CYContext &context) const { $T(NULL)