r2889: *** empty log message ***
[uffi.git] / src-mcl / strings.cl
index 12ff2acef65714503408c900c08614a326d32fa9..0c9a1c64271605cf12400d3e28b86ad592056479 100644 (file)
@@ -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)))