projects
/
uffi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r1692: *** empty log message ***
[uffi.git]
/
src
/
strings.cl
diff --git
a/src/strings.cl
b/src/strings.cl
index ba4dfa297b4d926a7daf7ec2501970acdf0aadac..4d95e334ee1da8c41fd3145ebeb36b9b5ad6cb18 100644
(file)
--- a/
src/strings.cl
+++ b/
src/strings.cl
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: strings.cl,v 1.1
1 2002/03/21 11:38:0
7 kevin Exp $
+;;;; $Id: strings.cl,v 1.1
4 2002/03/23 17:06:5
7 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; 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)))
)
,@body)))
)
+(defmacro with-cstrings (bindings &rest body)
+ (if bindings
+ `(with-cstring ,(car bindings)
+ (with-cstrings ,(cdr bindings)
+ ,@body))
+ `(progn ,@body)))
;;; Foreign string functions
;;; Foreign string functions
@@
-150,6
+156,7
@@
that LW/CMU automatically converts strings from c-calls."
)
(defmacro with-foreign-string ((foreign-string lisp-string) &body body)
)
(defmacro with-foreign-string ((foreign-string lisp-string) &body body)
+ #-(or lispworks cmu)
(let ((result (gensym)))
`(let* ((,foreign-string (convert-to-foreign-string ,lisp-string))
(,result (progn ,@body)))
(let ((result (gensym)))
`(let* ((,foreign-string (convert-to-foreign-string ,lisp-string))
(,result (progn ,@body)))
@@
-158,9
+165,6
@@
that LW/CMU automatically converts strings from c-calls."
,result)))
,result)))
-
-
-
;; Modified from CMUCL's source to handle non-null terminated strings
#+cmu
(defun cmucl-naturalize-cstring (sap &key
;; Modified from CMUCL's source to handle non-null terminated strings
#+cmu
(defun cmucl-naturalize-cstring (sap &key