summaryrefslogtreecommitdiff
path: root/Objective-C
diff options
context:
space:
mode:
Diffstat (limited to 'Objective-C')
-rw-r--r--Objective-C/libobjcl.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m
index 849eedf..205a998 100644
--- a/Objective-C/libobjcl.m
+++ b/Objective-C/libobjcl.m
@@ -65,7 +65,10 @@ objcl_invoke_with_types (int argc,
NS_DURING
{
#ifdef __NEXT_RUNTIME__
- method = class_getInstanceMethod ([receiver class], method_selector)->method_imp;
+ if (objcl_object_is_class (receiver))
+ method = class_getClassMethod (receiver, method_selector)->method_imp;
+ else
+ method = class_getInstanceMethod ([receiver class], method_selector)->method_imp;
#else
method = objc_msg_lookup (receiver, method_selector);
/* Alternatively: