Made compiled-form-to-string use write-string instead of printc, which
authorVladimir Sedach <vsedach@gmail.com>
Sun, 10 May 2009 17:39:02 +0000 (11:39 -0600)
committerVladimir Sedach <vsedach@gmail.com>
Sun, 10 May 2009 17:39:02 +0000 (11:39 -0600)
results in a much more efficient ps*.

src/compilation-interface.lisp

index 3c7ea77..cb97cf3 100644 (file)
@@ -25,12 +25,8 @@ Body is evaluated."
 
 (defun compiled-form-to-string (ps-compiled-form)
   (with-output-to-string (s)
-    (mapc (lambda (x)
-            (princ (if (stringp x)
-                       x
-                       (eval x))
-                   s))
-          (parenscript-print ps-compiled-form))))
+    (dolist (x (parenscript-print ps-compiled-form))
+      (write-string (if (stringp x) x (eval x)) s))))
 
 (defvar *js-inline-string-delimiter* #\"
   "Controls the string delimiter char used when compiling Parenscript in ps-inline.")