From 50025d579200f44fa24701bfbb4199f652c1fe52 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 18 Sep 2007 17:00:21 +0200 Subject: Simplify the Objective-C layer, make the newest additions compatible with the Apple runtime. darcs-hash:c6ec225e9ccf78e267f1a4985971ec9ac3239bc8 --- Lisp/utilities.lisp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Lisp/utilities.lisp') diff --git a/Lisp/utilities.lisp b/Lisp/utilities.lisp index a81b61c..b44c05d 100644 --- a/Lisp/utilities.lisp +++ b/Lisp/utilities.lisp @@ -6,8 +6,9 @@ (defun truep (b) - (not (or (zerop b) - (null b)))) + (or (eq b t) + (and (numberp b) + (not (zerop b))))) (defun id-eql (x y) @@ -16,17 +17,17 @@ (defun id-equal (x y) (truep (if (typep x '(or id objc-class exception)) - (invoke x :is-equal y) + (primitive-invoke x :is-equal :boolean y) (progn (assert (typep y '(or id objc-class exception))) - (invoke y :is-equal x))))) + (primitive-invoke y :is-equal :boolean x))))) (defun objc-typep (x class-designator) - (objc-eql (invoke x 'class) + (objc-eql (object-get-class x) (etypecase x (class x) - (id (invoke x 'class)) + (id (object-get-class x)) ((or string symbol) (find-objc-class class-designator t))))) -- cgit v1.2.3