Commit ff1a591e authored by Zach Beane's avatar Zach Beane
Browse files

Fix semantics of EXCL:STRING-TO-MB.

When :MB-VECTOR is provided, it should receive the results of the
conversion as a side-effect.
parent e60b6173
......@@ -207,11 +207,14 @@ values otherwise."
(length (string-to-octets string :external-format (translate-external-format external-format))))
(defun excl:string-to-mb (string &key external-format mb-vector null-terminate)
(declare (ignore mb-vector))
(when null-terminate
(error "Cannot null-terminate"))
(string-to-octets string
:external-format (translate-external-format external-format)))
(let ((result
(string-to-octets string
:external-format (translate-external-format external-format))))
(if mb-vector
(replace mb-vector result)
result)))
(defun excl:string-to-octets (string &key external-format null-terminate)
(when null-terminate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment