summaryrefslogtreecommitdiff
path: root/Lisp/method-definition.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-03 17:46:03 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-03 17:46:03 +0100
commite49008a9a4b7d9a0ab7e31f2ff53ff4e497b8d0b (patch)
treeafe51478c572562b787ccaf2aa29f82ad1a94a83 /Lisp/method-definition.lisp
parent2e26057818b48da27a5355e2d2101cb8605b840f (diff)
Introduce function INTERN-CALLBACK-NAME.
darcs-hash:5f2cb0e84fcace08fc832adaf3e48728fd76356c
Diffstat (limited to 'Lisp/method-definition.lisp')
-rw-r--r--Lisp/method-definition.lisp16
1 files changed, 15 insertions, 1 deletions
diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp
index b4ba605..a3ebaef 100644
--- a/Lisp/method-definition.lisp
+++ b/Lisp/method-definition.lisp
@@ -75,6 +75,20 @@
,@body)))))))
+(defvar *callback-names* (make-hash-table :test #'eql))
+
+(defun intern-callback-name (method)
+ (or (gethash method *callback-names* nil)
+ (setf (gethash method *callback-names* nil)
+ (intern (format nil "~A (~A)"
+ (generic-function-name
+ (method-generic-function method))
+ (sort (copy-list (method-qualifiers method))
+ #'string<
+ :key #'string))
+ '#:objective-cl))))
+
+
(defmethod add-method :after ((gf objective-c-generic-function)
(method objective-c-method))
;; FIXME: Support &REST arguments.
@@ -90,7 +104,7 @@
(return-typestring (print-typespec-to-string return-type))
(arg-typestrings (mapcar #'print-typespec-to-string
argument-types))
- (callback-name (gensym (selector-name method-name)))
+ (callback-name (intern-callback-name method))
(arg-symbols (mapcar #'(lambda (x)
(declare (ignore x))
(gensym "ARG"))