summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lisp/libobjcl.lisp3
-rw-r--r--Objective-C/libobjcl.h3
-rw-r--r--Objective-C/libobjcl.m8
3 files changed, 10 insertions, 4 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index 7c4137d..6296c46 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -167,7 +167,8 @@
(argc :int)
(return-typespec :string)
(arg-typespecs (:array :string))
- (signature :string))
+ (signature :string)
+ (registered-p :int))
(defcfun ("objcl_finalise_class" %objcl-finalise-class) :void
(class :pointer))
diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h
index b5cefce..b3e1a3a 100644
--- a/Objective-C/libobjcl.h
+++ b/Objective-C/libobjcl.h
@@ -203,7 +203,8 @@ objcl_add_method (Class class,
int argc,
const char *return_typespec,
const char *arg_typespecs[],
- const char *signature);
+ const char *signature,
+ int registered_p);
void
objcl_finalise_class (Class class);
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;