summaryrefslogtreecommitdiff
path: root/Objective-C/libobjcl.m
diff options
context:
space:
mode:
Diffstat (limited to 'Objective-C/libobjcl.m')
-rw-r--r--Objective-C/libobjcl.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m
index 8489891..1e70a37 100644
--- a/Objective-C/libobjcl.m
+++ b/Objective-C/libobjcl.m
@@ -807,14 +807,18 @@ objcl_add_method (Class class,
int argc,
const char *return_typespec,
const char *arg_typespecs[],
- const char *signature)
+ const char *signature,
+ int registered_p)
{
IMP imp;
imp = objcl_create_imp (callback, argc, return_typespec, arg_typespecs);
#ifdef __NEXT_RUNTIME__
- preclass_addMethod (class, method_name, imp, signature);
+ if (registered_p)
+ class_addMethod (class, method_name, imp, signature);
+ else
+ preclass_addMethod (class, method_name, imp, signature);
#else
NSString *class_name;
struct ObjCLMethod **methods;