summaryrefslogtreecommitdiff
path: root/libguile/extensions.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-10-16 02:34:18 -0400
committerMark H Weaver <mhw@netris.org>2018-10-17 21:38:43 -0400
commitc2a654b7d29f5e2f32fd1313cc80162fd0c8f992 (patch)
treeb7d3afb6adec15951465ad37ad2242017905a52a /libguile/extensions.c
parent3845343cf33b6fb81c772a65e238c5377668789d (diff)
Use 'scm_from_utf8_{string,symbol,keyword}' for C string literals.
Partial fix for <https://bugs.gnu.org/33044>. Reported by Tom de Vries <tdevries@suse.de>. Fix several instances of the mistake of using 'scm_from_locale_*' for C strings that originally came from a C string literal. Change several uses of 'scm_from_latin1_*' as well, to promote the practice of writing code that works for arbitrary C string literals. Also add missing years to the copyright notices of changed files, based on the git history. * libguile/debug-malloc.c, libguile/deprecation.c, libguile/error.c, libguile/eval.c, libguile/expand.c, libguile/extensions.c, libguile/filesys.c, libguile/init.c, libguile/load.c, libguile/modules.c, libguile/pairs.c, libguile/posix.c, libguile/print.c, libguile/random.c, libguile/read.c, libguile/regex-posix.c, libguile/snarf.h, libguile/srfi-13.c, libguile/stacks.c, libguile/stime.c, libguile/strports.c, libguile/values.c: Use 'scm_from_utf8_*' where appropriate.
Diffstat (limited to 'libguile/extensions.c')
-rw-r--r--libguile/extensions.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libguile/extensions.c b/libguile/extensions.c
index 1c3d28f4a..ab108930d 100644
--- a/libguile/extensions.c
+++ b/libguile/extensions.c
@@ -1,6 +1,7 @@
/* extensions.c - registering and loading extensions.
*
- * Copyright (C) 2001, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2004, 2006, 2009-2011, 2018
+ * Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -90,9 +91,9 @@ load_extension (SCM lib, SCM init)
scm_dynwind_begin (0);
- clib = scm_to_locale_string (lib);
+ clib = scm_to_utf8_string (lib);
scm_dynwind_free (clib);
- cinit = scm_to_locale_string (init);
+ cinit = scm_to_utf8_string (init);
scm_dynwind_free (cinit);
for (ext = head; ext; ext = ext->next)
@@ -123,7 +124,7 @@ load_extension (SCM lib, SCM init)
void
scm_c_load_extension (const char *lib, const char *init)
{
- load_extension (scm_from_locale_string (lib), scm_from_locale_string (init));
+ load_extension (scm_from_utf8_string (lib), scm_from_utf8_string (init));
}
SCM_DEFINE (scm_load_extension, "load-extension", 2, 0, 0,