Fix string-for-primitive: it wasn't handling slices.
authorChris Hanson <org/chris-hanson/cph>
Wed, 29 Mar 2017 05:02:22 +0000 (22:02 -0700)
committerChris Hanson <org/chris-hanson/cph>
Wed, 29 Mar 2017 05:02:22 +0000 (22:02 -0700)
src/runtime/ustring.scm

index 8c236b8df238568815e857db8876cb3ab31aa9c1..6a235e6b90217ea1538bfd10346d00a8d283c7a3 100644 (file)
@@ -1648,8 +1648,8 @@ USA.
                            %full-string-ref string 0 end)
                 to)
               (string->utf8 string))))
-       (else
-        (error:not-a string? string 'string-for-primitive))))
+       ((slice? string) (string->utf8 string))
+       (else (error:not-a string? string 'string-for-primitive))))
 
 (define-integrable (copy-loop to-set! to at from-ref from start end)
   (do ((i start (fix:+ i 1))