From: Jay Freeman (saurik) Date: Thu, 13 Sep 2012 19:19:57 +0000 (-0700) Subject: Improve definition of CYIsClass using meta classes. X-Git-Tag: v0.9.459~2 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/489b8a0a6656251c7610bdccd1557938faa3a424?ds=inline Improve definition of CYIsClass using meta classes. --- diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index 3a422ed..e94e797 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -1115,8 +1115,7 @@ NSObject *CYCopyNSObject(apr_pool_t *pool, JSContextRef context, JSValueRef valu static bool CYIsClass(id self) { #ifdef __APPLE__ - // XXX: this is a lame object_isClass - return class_getInstanceMethod(object_getClass(self), @selector(alloc)) != NULL; + return class_isMetaClass(object_getClass(self)); #else return GSObjCIsClass(self); #endif