r2889: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 29 Sep 2002 18:54:17 +0000 (18:54 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 29 Sep 2002 18:54:17 +0000 (18:54 +0000)
debian/changelog
src-mcl/strings.cl

index daf8930e657abef9ad86c02ae1deda5231785f07..7f2047c64201f5d1cd6bcfc974cc82409ea8932a 100644 (file)
@@ -1,3 +1,9 @@
+cl-uffi (0.8.5-1) unstable; urgency=low
+
+  * Add with-cstrings macro to mcl's source
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  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
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)))