summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-08-06 17:46:06 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-08-06 17:46:06 +0200
commitb423c77db3caafb5eeb55cf185893aba8c23b842 (patch)
tree4a02bd8737aefb5e83255826206cca233590cda0 /Lisp
parente562ec45a61b6b60fdbacf609ece03d998452b95 (diff)
More cleanups.
darcs-hash:71c91c19f791ff48c670b718e4b9cecd96465ee8
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/libobjcl.lisp35
1 files changed, 16 insertions, 19 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index 9591f8f..b38aa6e 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -148,13 +148,22 @@ conventional case for namespace identifiers in Objective C."
(defun find-objc-class-by-name (class-name)
(with-foreign-objects ((obj-data (%objcl-find-class class-name)))
- (unwind-protect
- (if (null-pointer-p (foreign-slot-value
- (foreign-slot-value obj-data 'obj-data 'data)
- 'obj-data-union
- 'class-val))
- nil
- (obj-data->lisp obj-data)))))
+ (if (null-pointer-p (foreign-slot-value
+ (foreign-slot-value obj-data 'obj-data 'data)
+ 'obj-data-union
+ 'class-val))
+ nil
+ (obj-data->lisp obj-data))))
+
+
+(defun find-selector-by-name (selector-name)
+ (with-foreign-objects ((obj-data (%objcl-find-selector selector-name)))
+ (if (null-pointer-p (foreign-slot-value
+ (foreign-slot-value obj-data 'obj-data 'data)
+ 'obj-data-union
+ 'sel-val))
+ nil
+ (obj-data->lisp obj-data))))
(defun objcl-class-name (class)
@@ -222,15 +231,3 @@ by which __invoke__ converts its arguments into a *message name*.
(string (find-selector-by-name selector-name))
(list (find-selector-by-name (symbol-list->message-name
selector-name)))))
-
-
-(defun find-selector-by-name (selector-name)
- (let ((obj-data (%objcl-find-selector selector-name)))
- (prog1
- (if (null-pointer-p (foreign-slot-value
- (foreign-slot-value obj-data 'obj-data 'data)
- 'obj-data-union
- 'sel-val))
- nil
- (obj-data->lisp obj-data))
- (dealloc-obj-data obj-data))))