From cebd1a724eb3eb4b899d8f79306eebf2ccf6905a Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 21 Oct 2001 21:33:57 +0000 Subject: [PATCH] Fixed MKBINDING-LATE so it actually works Organization: Straylight/Edgeware From: espen --- glib/gforeign.lisp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/glib/gforeign.lisp b/glib/gforeign.lisp index 5b2c8cb..a3a79e9 100644 --- a/glib/gforeign.lisp +++ b/glib/gforeign.lisp @@ -15,7 +15,7 @@ ;; License along with this library; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -;; $Id: gforeign.lisp,v 1.11 2001-10-21 16:50:43 espen Exp $ +;; $Id: gforeign.lisp,v 1.12 2001-10-21 21:33:57 espen Exp $ (in-package "GLIB") @@ -395,19 +395,17 @@ (defun every-type-translateable-p (type-specs) (defun mkbinding-late (name return-type &rest arg-types) (if (every-type-translateable-p (cons return-type arg-types)) (apply #'mkbinding name return-type arg-types) - (let* ((binding - #'(lambda (&rest args) - (cond - ((every-type-translateable-p (cons return-type arg-types)) - (setq binding (apply #'mkbinding name return-type arg-types)) - (apply binding args)) - (t - (dolist (type-spec (cons return-type arg-types)) - (unless (type-translateable-p type-spec) - (error "Can't translate type ~A" type-spec)))))))) + (let ((binding nil)) #'(lambda (&rest args) - (apply binding args))))) - + (cond + (binding (apply binding args)) + ((every-type-translateable-p (cons return-type arg-types)) + (setq binding (apply #'mkbinding name return-type arg-types)) + (apply binding args)) + (t + (dolist (type-spec (cons return-type arg-types)) + (unless (type-translateable-p type-spec) + (error "Can't translate type ~A" type-spec))))))))) -- [mdw]