r10834: 2005-11-14 Kevin Rosenberg (kevin@rosenberg.net)
[uffi.git] / src / strings.lisp
index e54a94095c8aa0d284f93cb509e03c48c22aad2d..ebdffebadf4893287c870b97cd5879ecf6462993 100644 (file)
@@ -9,11 +9,7 @@
 ;;;;
 ;;;; $Id$
 ;;;;
-;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
-;;;;
-;;;; UFFI users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the Lisp Lesser GNU Public License
-;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg
 ;;;; *************************************************************************
 
 (in-package #:uffi)
@@ -288,6 +284,11 @@ that LW/CMU automatically converts strings from c-calls."
       (free-foreign-object ,foreign-string)
       ,result)))
 
+(defmacro with-foreign-strings (bindings &body body)
+  `(with-foreign-string ,(car bindings)
+    ,@(if (cdr bindings)
+          `((with-foreign-strings ,(cdr bindings) ,@body))
+          body)))
 
 ;; Modified from CMUCL's source to handle non-null terminated strings
 #+cmu