From 7a3459cee18e9e63919801c74175baab3e0ae0f8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 19 Jan 2014 10:35:47 -0800 Subject: [PATCH] Rename Super to objc_super to better future-proof. --- ObjectiveC/Library.mm | 4 ++-- ObjectiveC/Replace.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index 0e863fa..3cf9e8a 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -2493,7 +2493,7 @@ static JSValueRef Message_callAsFunction(JSContextRef context, JSObjectRef objec static JSObjectRef Super_new(JSContextRef context, JSObjectRef object, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry { if (count != 2) - throw CYJSError(context, "incorrect number of arguments to Super constructor"); + throw CYJSError(context, "incorrect number of arguments to objc_super constructor"); CYPool pool; id self(CYCastNSObject(&pool, context, arguments[0])); Class _class(CYCastClass(pool, context, arguments[1])); @@ -2960,7 +2960,7 @@ void CYObjectiveC_SetupContext(JSContextRef context) { CYPoolTry { CYSetProperty(context, cycript, CYJSString("Instance"), Instance); CYSetProperty(context, cycript, CYJSString("Selector"), Selector); - CYSetProperty(context, cycript, CYJSString("Super"), Super); + CYSetProperty(context, cycript, CYJSString("objc_super"), Super); JSObjectRef box(JSObjectMakeFunctionWithCallback(context, CYJSString("box"), &Instance_box_callAsFunction)); CYSetProperty(context, Instance, CYJSString("box"), box); diff --git a/ObjectiveC/Replace.cpp b/ObjectiveC/Replace.cpp index c3a885c..a2a4c11 100644 --- a/ObjectiveC/Replace.cpp +++ b/ObjectiveC/Replace.cpp @@ -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 -- 2.50.0