WITH-CSTRING coerces Unicode strings.

This commit is contained in:
Juan Jose Garcia Ripoll 2009-05-17 15:04:29 +02:00
parent fa2cb50c1e
commit 10ece08ad1
2 changed files with 5 additions and 2 deletions

View file

@ -18,6 +18,9 @@ ECL 9.5:
#.(MAKE-PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY '(:RELATIVE) :NAME NIL
:TYPE NIL :VERSION :NEWEST :DEFAULTS NIL)
- WITH-CSTRING automatically coerces extended strings to base strings,
signalling an error when this is not possible.
* Bugs:
- Remove an obsolete #if statement for Solaris that broke current builds

View file

@ -391,13 +391,13 @@
;; This enforces that the string contains only as many characters as the
;; fill-pointer determines Since ECL always sets a 0 character after the
;; last element of a string, this way, the string is always zero-terminated
`(copy-seq ,object))
`(si:copy-to-simple-base-string ,object))
(defmacro free-cstring (object)
object)
(defmacro with-cstring ((cstring string) &body body)
`(let ((,cstring (copy-seq ,string))) ,@body))
`(let ((,cstring (convert-to-cstring ,string))) ,@body))
(defmacro with-cstrings (bindings &rest body)
(if bindings