From 70961aaf321b11e18884c7815d679e2b560996af Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 15 Nov 2005 02:40:17 +0000 Subject: [PATCH] r10834: 2005-11-14 Kevin Rosenberg (kevin@rosenberg.net) * Version 1.5.7 * src/strings.lisp: Add with-foreign-strings by James Biel --- ChangeLog | 4 ++++ debian/changelog | 6 ++++++ src/package.lisp | 1 + src/strings.lisp | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8af66f4..ef92a5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-11-14 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.7 + * src/strings.lisp: Add with-foreign-strings by James Biel + 2005-11-14 Kevin Rosenberg (kevin@rosenberg.net) * Version 1.5.6 * src/os.lisp: Remove getenv setter diff --git a/debian/changelog b/debian/changelog index de50323..009ae4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-uffi (1.5.7-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Mon, 14 Nov 2005 19:39:25 -0700 + cl-uffi (1.5.6-1) unstable; urgency=low * New upstream diff --git a/src/package.lisp b/src/package.lisp index abaad46..963a16e 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -63,6 +63,7 @@ #:convert-to-foreign-string #:allocate-foreign-string #:with-foreign-string + #:with-foreign-strings #:foreign-string-length ;; function call diff --git a/src/strings.lisp b/src/strings.lisp index c815628..ebdffeb 100644 --- a/src/strings.lisp +++ b/src/strings.lisp @@ -284,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 -- 2.34.1