X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fstrings.cl;h=4d95e334ee1da8c41fd3145ebeb36b9b5ad6cb18;hb=1154e07dae80fba5bdfa1abbd3342dc16313f864;hp=75496e08a3c77a1069e774bea0155d641e6f73d0;hpb=379a7c3e7b8249ace498d8733c87a3f575a7c799;p=uffi.git diff --git a/src/strings.cl b/src/strings.cl index 75496e0..4d95e33 100644 --- a/src/strings.cl +++ b/src/strings.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: strings.cl,v 1.12 2002/03/22 20:51:08 kevin Exp $ +;;;; $Id: strings.cl,v 1.14 2002/03/23 17:06:57 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -67,6 +67,12 @@ that LW/CMU automatically converts strings from c-calls." ,@body))) ) +(defmacro with-cstrings (bindings &rest body) + (if bindings + `(with-cstring ,(car bindings) + (with-cstrings ,(cdr bindings) + ,@body)) + `(progn ,@body))) ;;; Foreign string functions @@ -159,9 +165,6 @@ that LW/CMU automatically converts strings from c-calls." ,result))) - - - ;; Modified from CMUCL's source to handle non-null terminated strings #+cmu (defun cmucl-naturalize-cstring (sap &key