diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-06 23:34:26 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-06 23:34:26 +0100 |
commit | e49885190142d1655cd4358d402dba5237445409 (patch) | |
tree | 2f34046ca25848136648d1b931367730e0d1db2f /Lisp | |
parent | 016f543b4726b8c46415c78eb0efea86488a4641 (diff) |
Remove a bunch of DEFINE-OBJECTIVE-C-GENERIC-FUNCTION calls.
darcs-hash:83d1f95687bb761a7fb70c1a901722d4cd2c5caf
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/lisp-value-wrapping.lisp | 6 | ||||
-rw-r--r-- | Lisp/method-definition.lisp | 5 | ||||
-rw-r--r-- | Lisp/tests.lisp | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/Lisp/lisp-value-wrapping.lisp b/Lisp/lisp-value-wrapping.lisp index 3236d99..a25cb2d 100644 --- a/Lisp/lisp-value-wrapping.lisp +++ b/Lisp/lisp-value-wrapping.lisp @@ -117,8 +117,6 @@ (:metaclass ns::+ns-object)) - -(define-objective-c-generic-function #/description (self)) (define-objective-c-method #/description :id ((self ns::mlk-lisp-value)) (#/stringWithUTF8String: (find-objc-class 'ns-string) (format nil "<MLKLispValue: ~A>" @@ -133,7 +131,6 @@ :base 10)))) -(define-objective-c-generic-function #/characterAtIndex: (self index)) (define-objective-c-method #/characterAtIndex: :short ((self ns::mlk-lisp-string) (index :unsigned-long)) ;; index is actually NSUInteger == @@ -144,18 +141,15 @@ (char-int (char (lisp-value self) index))) -(define-objective-c-generic-function #/length (self)) (define-objective-c-method #/length :unsigned-long ((self ns::mlk-lisp-string)) (length (lisp-value self))) -(define-objective-c-generic-function #/objectAtIndex: (self index)) (define-objective-c-method #/objectAtIndex: ((self ns::mlk-lisp-array) (index :unsigned-long)) (aref (lisp-value self) index)) -(define-objective-c-generic-function #/count (self)) (define-objective-c-method #/count ((self ns::mlk-lisp-array)) (length (lisp-value self))) diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp index 7c9c75f..9541a49 100644 --- a/Lisp/method-definition.lisp +++ b/Lisp/method-definition.lisp @@ -217,6 +217,11 @@ __super__" `(progn (eval-when (:load-toplevel :execute) (unless (fboundp ',real-name) + ;; Note that we need not specify a + ;; :LAMBDA-LIST here, as not supplying + ;; it means it's simply going to be + ;; initialised when a method is first + ;; added to the generic function. (ensure-generic-function ',real-name :generic-function-class diff --git a/Lisp/tests.lisp b/Lisp/tests.lisp index 94a20b0..ac3eaca 100644 --- a/Lisp/tests.lisp +++ b/Lisp/tests.lisp @@ -472,8 +472,7 @@ ((self ,subnumclass-name) (number ns::ns-number)) (* 2 (super))))) - (is (eval `(define-objective-c-generic-function #/foo:bar:stuff:do: - (a b c d e &rest f)))) + ;; We may omit DEFINE-OBJECTIVE-C-GENERIC-FUNCTION. (is (eval `(define-objective-c-method #/foo:bar:stuff:do: :int ((x ,class-name) (y :int) |