X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fstrings.lisp;h=ebdffebadf4893287c870b97cd5879ecf6462993;hb=70961aaf321b11e18884c7815d679e2b560996af;hp=c81562862714c1f9ed722d57fcef3df23ea29145;hpb=3ade95bab16abe09642554e9cbf56f117f01e507;p=uffi.git 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