diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-18 17:00:21 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-18 17:00:21 +0200 |
commit | 50025d579200f44fa24701bfbb4199f652c1fe52 (patch) | |
tree | 0b74ee690eb4f8eb663d938daa11c96fc64f44ca /Lisp/utilities.lisp | |
parent | 01fd2213c11ae1455ef305803cdc5ae674e2e75b (diff) |
Simplify the Objective-C layer, make the newest additions compatible with the Apple runtime.
darcs-hash:c6ec225e9ccf78e267f1a4985971ec9ac3239bc8
Diffstat (limited to 'Lisp/utilities.lisp')
-rw-r--r-- | Lisp/utilities.lisp | 13 |
1 files changed, 7 insertions, 6 deletions
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))))) |