string->utf8 implementation uses scm_from_utf8_stringn
authorAndy Wingo <wingo@pobox.com>
Tue, 15 Jan 2013 14:07:15 +0000 (15:07 +0100)
committerAndy Wingo <wingo@pobox.com>
Tue, 15 Jan 2013 15:36:55 +0000 (16:36 +0100)
* libguile/bytevectors.c (UTF_TO_STRING): Use scm_from_utf8_stringn.

libguile/bytevectors.c

index 4ce90eb..9093f49 100644 (file)
@@ -2028,8 +2028,7 @@ SCM_DEFINE (scm_string_to_utf32, "string->utf32",
                      scm_list_1 (utf), err);                           \
   else                                                                 \
     {                                                                   \
-      str = scm_from_stringn (c_str, c_strlen, "UTF-8",                 \
-                              SCM_FAILED_CONVERSION_ERROR);             \
+      str = scm_from_utf8_stringn (c_str, c_strlen);                    \
       free (c_str);                                                     \
     }                                                                   \
   return (str);