diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-10-04 16:57:36 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-10-04 16:57:36 +0200 |
commit | b8764bfc2acf5f569b864a8b30175d2285b529d7 (patch) | |
tree | 2235aa8ad5451309d8d5cf465f14fdf3d11c42f5 /Lisp/utilities.lisp | |
parent | 2b699e8f4abc96ae57206250cf1e6e558089e2f7 (diff) |
Mimic the way PyObjC handles types.
darcs-hash:d7cf81f2dd93817e55a04816f3851fabce3dac55
Diffstat (limited to 'Lisp/utilities.lisp')
-rw-r--r-- | Lisp/utilities.lisp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lisp/utilities.lisp b/Lisp/utilities.lisp index 5ead57a..a1b3c4e 100644 --- a/Lisp/utilities.lisp +++ b/Lisp/utilities.lisp @@ -152,12 +152,17 @@ invocations will return numbers.) (defun id-equal (x y) + ;; Note that we have to use INVOKE rather than PRIMITIVE-INVOKE here, + ;; because we don't know wheter BOOL == char. We don't even know + ;; whether the typespec "c" indicates a char or an int, for that + ;; matter (it only does so on NeXT/x86, but neither on GNUstep nor on + ;; NeXT/ppc32). (or (id-eql x y) (truep (if (typep x '(or id objc-class exception)) - (primitive-invoke x :is-equal :char y) + (invoke x :is-equal y) (progn (assert (typep y '(or id objc-class exception))) - (primitive-invoke y :is-equal :char x)))))) + (invoke y :is-equal x)))))) (defun objc-typep (x class-designator) |