From 489b8a0a6656251c7610bdccd1557938faa3a424 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 13 Sep 2012 12:19:57 -0700 Subject: [PATCH] Improve definition of CYIsClass using meta classes. --- ObjectiveC/Library.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.45.2