From 0fe4a14bb8b8ae7f74be97d6f51ff1d062d91b74 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 13 Sep 2012 01:49:17 -0700 Subject: [PATCH] Prefer __NSCFBoolean to non-__ for iOS compatibility. --- ObjectiveC/Library.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index db3196b..1749d88 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -2539,9 +2539,10 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { Selector_type = new(pool) Type_privateData(":"); #ifdef __APPLE__ - NSCFBoolean_ = objc_getClass("NSCFBoolean"); + // XXX: apparently, iOS now has both of these + NSCFBoolean_ = objc_getClass("__NSCFBoolean"); if (NSCFBoolean_ == nil) - NSCFBoolean_ = objc_getClass("__NSCFBoolean"); + NSCFBoolean_ = objc_getClass("NSCFBoolean"); NSCFType_ = objc_getClass("NSCFType"); NSGenericDeallocHandler_ = objc_getClass("__NSGenericDeallocHandler"); -- 2.45.2