From b8764bfc2acf5f569b864a8b30175d2285b529d7 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 4 Oct 2007 16:57:36 +0200 Subject: Mimic the way PyObjC handles types. darcs-hash:d7cf81f2dd93817e55a04816f3851fabce3dac55 --- Lisp/utilities.lisp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Lisp/utilities.lisp') 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) -- cgit v1.2.3