From e562ec45a61b6b60fdbacf609ece03d998452b95 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Mon, 6 Aug 2007 17:44:07 +0200 Subject: Minor cleanups. darcs-hash:ee74b33660af9dc6b1e0207285907211dd7e600a --- Lisp/libobjcl.lisp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Lisp/libobjcl.lisp') diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index fff0963..9591f8f 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -147,26 +147,25 @@ conventional case for namespace identifiers in Objective C." (defun find-objc-class-by-name (class-name) - (let ((obj-data (%objcl-find-class 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)) - (dealloc-obj-data obj-data)))) + (obj-data->lisp obj-data))))) (defun objcl-class-name (class) (declare (type (or objc-class id exception) class)) - (with-foreign-objects ((obj-data class)) + (with-foreign-conversion ((obj-data class)) (%objcl-class-name obj-data))) (defun selector-name (selector) (declare (type selector selector)) - (with-foreign-objects ((obj-data selector)) + (with-foreign-conversion ((obj-data selector)) (%objcl-selector-name obj-data))) -- cgit v1.2.3