From 2f81bd09481e7879ee2c7fda4fea1d6e53586fe7 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 29 Sep 2002 18:54:17 +0000 Subject: [PATCH] r2889: *** empty log message *** --- debian/changelog | 6 ++++++ src-mcl/strings.cl | 21 +++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index daf8930..7f2047c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-uffi (0.8.5-1) unstable; urgency=low + + * Add with-cstrings macro to mcl's source + + -- Kevin M. Rosenberg Sun, 29 Sep 2002 12:19:20 -0600 + cl-uffi (0.8.4-1) unstable; urgency=low * Change mcl's load-library definition from macro to function diff --git a/src-mcl/strings.cl b/src-mcl/strings.cl index 12ff2ac..0c9a1c6 100644 --- a/src-mcl/strings.cl +++ b/src-mcl/strings.cl @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg and John DeSoi ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: strings.cl,v 1.2 2002/09/20 04:51:14 kevin Exp $ +;;;; $Id: strings.cl,v 1.3 2002/09/29 18:54:17 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and John DeSoi @@ -181,19 +181,12 @@ that CMU automatically converts strings from c-calls." ,@body))) -#| Works but, supposedly the built in method is better -(defmacro with-cstring ((foreign-string lisp-string) &body body) - (let ((result (gensym))) - `(let* ((,foreign-string (convert-to-cstring ,lisp-string)) - (,result ,@body)) - (dispose-ptr ,foreign-string) - ,result)) - ) - -|# - - - +(defmacro with-cstrings (bindings &rest body) + (if bindings + `(with-cstring ,(car bindings) + (with-cstrings ,(cdr bindings) + ,@body)) + `(progn ,@body))) (defmacro with-foreign-string ((foreign-string lisp-string) &body body) (let ((result (gensym))) -- 2.34.1