diff options
author | Mark H Weaver <mhw@netris.org> | 2018-10-16 02:34:18 -0400 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-05-23 16:41:53 +0200 |
commit | 3ae69f30632dba1677d2ed822297cf4599a8d9dd (patch) | |
tree | 4f5d8efb70eb1afeccda49f60e5dcf919d48232a /libguile/keywords.h | |
parent | a47a5e6828432fb80c82ce002553f59c6447b911 (diff) | |
download | guile-3ae69f30632dba1677d2ed822297cf4599a8d9dd.tar.gz |
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/keywords.h')
-rw-r--r-- | libguile/keywords.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/keywords.h b/libguile/keywords.h index 42040f094..c8f480869 100644 --- a/libguile/keywords.h +++ b/libguile/keywords.h @@ -1,7 +1,7 @@ #ifndef SCM_KEYWORDS_H #define SCM_KEYWORDS_H -/* Copyright 1995-1996,1999-2001,2006,2008,2015,2018 +/* Copyright 1995-1996,1999-2001,2006,2008,2015,2018-2019 Free Software Foundation, Inc. This file is part of Guile. @@ -42,11 +42,11 @@ SCM_API SCM scm_from_utf8_keyword (const char *name); #define SCM_KEYWORD(c_name, scheme_name) \ SCM_SNARF_HERE(static SCM c_name) \ -SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name)) +SCM_SNARF_INIT(c_name = scm_from_utf8_keyword (scheme_name)) #define SCM_GLOBAL_KEYWORD(c_name, scheme_name) \ SCM_SNARF_HERE(SCM c_name) \ -SCM_SNARF_INIT(c_name = scm_from_locale_keyword (scheme_name)) +SCM_SNARF_INIT(c_name = scm_from_utf8_keyword (scheme_name)) enum scm_keyword_arguments_flags { |