X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstrings.cl;h=8bd95bd243e54bd1143cc8e4cef3a559a537f5ad;hb=f1b4c9104bcc720234a87febb3d264fe96890820;hp=ba4dfa297b4d926a7daf7ec2501970acdf0aadac;hpb=f860fa69768ba86084196b9e482d497d7ef60901;p=uffi.git diff --git a/src/strings.cl b/src/strings.cl index ba4dfa2..8bd95bd 100644 --- a/src/strings.cl +++ b/src/strings.cl @@ -1,4 +1,4 @@ -;;;; -*- Mode: ANSI-Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: strings.cl,v 1.11 2002/03/21 11:38:07 kevin Exp $ +;;;; $Id: strings.cl,v 1.17 2002/04/06 19:53:08 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 @@ -158,9 +164,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