latin1 subr and message in internal scm_{encoding,decoding}_error
authorAndy Wingo <wingo@pobox.com>
Fri, 1 Apr 2011 09:05:37 +0000 (11:05 +0200)
committerAndy Wingo <wingo@pobox.com>
Fri, 1 Apr 2011 09:05:37 +0000 (11:05 +0200)
* libguile/strings.c (scm_encoding_error, scm_decoding_error): Use
  scm_from_latin1_string for the subr and message args, as these are
  internal functions, and we know their callers.

libguile/strings.c

index cdf8141..bf63704 100644 (file)
@@ -1423,8 +1423,8 @@ scm_encoding_error (const char *subr, int err, const char *message,
                    SCM port, SCM chr)
 {
   scm_throw (scm_encoding_error_key,
-            scm_list_n (scm_from_locale_string (subr),
-                        scm_from_locale_string (message),
+            scm_list_n (scm_from_latin1_string (subr),
+                        scm_from_latin1_string (message),
                         scm_from_int (err),
                         port, chr,
                         SCM_UNDEFINED));
@@ -1436,8 +1436,8 @@ void
 scm_decoding_error (const char *subr, int err, const char *message, SCM port)
 {
   scm_throw (scm_decoding_error_key,
-            scm_list_n (scm_from_locale_string (subr),
-                        scm_from_locale_string (message),
+            scm_list_n (scm_from_latin1_string (subr),
+                        scm_from_latin1_string (message),
                         scm_from_int (err),
                         port,
                         SCM_UNDEFINED));