+cl-uffi (0.8.5-1) unstable; urgency=low
+
+ * Add with-cstrings macro to mcl's source
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 29 Sep 2002 12:19:20 -0600
+
cl-uffi (0.8.4-1) unstable; urgency=low
* Change mcl's load-library definition from macro to function
;;;; Programmers: Kevin M. Rosenberg and John DeSoi
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: strings.cl,v 1.2 2002/09/20 04:51:14 kevin Exp $
+;;;; $Id: strings.cl,v 1.3 2002/09/29 18:54:17 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and John DeSoi
,@body)))
-#| Works but, supposedly the built in method is better
-(defmacro with-cstring ((foreign-string lisp-string) &body body)
- (let ((result (gensym)))
- `(let* ((,foreign-string (convert-to-cstring ,lisp-string))
- (,result ,@body))
- (dispose-ptr ,foreign-string)
- ,result))
- )
-
-|#
-
-
-
+(defmacro with-cstrings (bindings &rest body)
+ (if bindings
+ `(with-cstring ,(car bindings)
+ (with-cstrings ,(cdr bindings)
+ ,@body))
+ `(progn ,@body)))
(defmacro with-foreign-string ((foreign-string lisp-string) &body body)
(let ((result (gensym)))