Change uri-encode to avoid copying strings

parent 2b59d73f
2019-08-17 Vladimir Sedach <>
* uri-template.lisp (uri-encode):
Avoid copying strings.
2019-08-16 Vladimir Sedach <>
* Removed uri-encode? and uri-decode? variables.
......@@ -47,7 +47,12 @@ read URI templates from your own dispatch character."
(reverse template-accumulator))))
(defmacro uri-encode (x)
`(percent-encoding:encode (princ-to-string ,x)))
(let ((x1 (gensym)))
(let ((,x1 ,x))
(if (stringp ,x1)
(princ-to-string ,x1))))))
(defun uri-template (&rest template-args)
"The car of the list that the URI template reader produces. A
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