summaryrefslogtreecommitdiff
path: root/Lisp/method-definition.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-04 22:54:09 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-04 22:54:09 +0100
commitb450583841e5661383a2dff9408e23ea3e313b5a (patch)
treeeb45fa9d98ed51b64c1407343ab44fdc91bfc96b /Lisp/method-definition.lisp
parent2bfce24e72cfa7a339b485980925839f769e5224 (diff)
Introduce macro DEFINE-OBJECTIVE-C-GENERIC-FUNCTION.
darcs-hash:407ea76ee108cb03e819c6d5027b828a1232e24b
Diffstat (limited to 'Lisp/method-definition.lisp')
-rw-r--r--Lisp/method-definition.lisp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp
index 7e71f31..d97c2a8 100644
--- a/Lisp/method-definition.lisp
+++ b/Lisp/method-definition.lisp
@@ -75,6 +75,18 @@
,@body)))))))
+(defmacro define-objective-c-generic-function (name lambda-list &body options)
+ `(defgeneric ,name ,lambda-list
+ ,@(unless (position :generic-function-class
+ options
+ :key #'car)
+ `((:generic-function-class objcl:objective-c-generic-function)))
+ ,@(unless (position :method-class
+ options
+ :key #'car)
+ `((:method-class objcl:objective-c-method)))))
+
+
(defvar *callback-names* (make-hash-table :test #'eql))
(defun intern-callback-name (method)