diff options
author | Andy Wingo <wingo@pobox.com> | 2011-10-25 17:45:29 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-10-25 17:45:29 +0200 |
commit | 25d50a051d8de9c438d6ed910bec13be682b3b12 (patch) | |
tree | 442f495241a9da699421562f190c6b37617bfcc5 | |
parent | f80d15c59e962d197c0cb8e98fd84bdd27bc449e (diff) |
most uses of scm_from_locale_symbol become scm_from_utf8_symbol
* libguile/array-handle.c:
* libguile/chars.c:
* libguile/expand.c:
* libguile/feature.c:
* libguile/goops.c:
* libguile/gsubr.c:
* libguile/instructions.c:
* libguile/load.c:
* libguile/macros.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/options.c:
* libguile/print.c:
* libguile/smob.c:
* libguile/snarf.h: Change most uses of scm_from_locale_symbol to
scm_from_utf8_symbol, as the symbols really are not locale-dependent.
-rw-r--r-- | libguile/array-handle.c | 4 | ||||
-rw-r--r-- | libguile/chars.c | 4 | ||||
-rw-r--r-- | libguile/expand.c | 4 | ||||
-rw-r--r-- | libguile/feature.c | 2 | ||||
-rw-r--r-- | libguile/goops.c | 4 | ||||
-rw-r--r-- | libguile/gsubr.c | 2 | ||||
-rw-r--r-- | libguile/instructions.c | 2 | ||||
-rw-r--r-- | libguile/load.c | 2 | ||||
-rw-r--r-- | libguile/macros.c | 2 | ||||
-rw-r--r-- | libguile/memoize.c | 2 | ||||
-rw-r--r-- | libguile/modules.c | 26 | ||||
-rw-r--r-- | libguile/options.c | 4 | ||||
-rw-r--r-- | libguile/print.c | 2 | ||||
-rw-r--r-- | libguile/smob.c | 2 | ||||
-rw-r--r-- | libguile/snarf.h | 4 |
15 files changed, 33 insertions, 33 deletions
diff --git a/libguile/array-handle.c b/libguile/array-handle.c index ec3127a4a..7114f78e0 100644 --- a/libguile/array-handle.c +++ b/libguile/array-handle.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009, 2011 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 @@ -132,7 +132,7 @@ void scm_init_array_handle (void) { #define DEFINE_ARRAY_TYPE(tag, TAG) \ - scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_##TAG] = scm_from_locale_symbol (#tag) + scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_##TAG] = scm_from_utf8_symbol (#tag) scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_SCM] = SCM_BOOL_T; DEFINE_ARRAY_TYPE (a, CHAR); diff --git a/libguile/chars.c b/libguile/chars.c index 2e1610566..fbedb0fe2 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998, 2000, 2001, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998, 2000, 2001, 2004, 2006, 2008, 2009, 2010, 2011 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 @@ -492,7 +492,7 @@ SCM_DEFINE (scm_char_general_category, "char-general-category", 1, 0, 0, sym = uc_general_category_name (cat); if (sym != NULL) - return scm_from_locale_symbol (sym); + return scm_from_utf8_symbol (sym); return SCM_BOOL_F; } #undef FUNC_NAME diff --git a/libguile/expand.c b/libguile/expand.c index 78dd4cac4..3f23d4f8f 100644 --- a/libguile/expand.c +++ b/libguile/expand.c @@ -1214,13 +1214,13 @@ make_exp_vtable (size_t n) (scm_string_append (scm_make_list (scm_from_size_t (exp_nfields[n]), scm_from_locale_string ("pw")))); printer = SCM_BOOL_F; - name = scm_from_locale_symbol (exp_names[n]); + name = scm_from_utf8_symbol (exp_names[n]); code = scm_from_size_t (n); fields = SCM_EOL; { size_t m = exp_nfields[n]; while (m--) - fields = scm_cons (scm_from_locale_symbol (exp_field_names[n][m]), fields); + fields = scm_cons (scm_from_utf8_symbol (exp_field_names[n][m]), fields); } return scm_c_make_struct (scm_exp_vtable_vtable, 0, 5, diff --git a/libguile/feature.c b/libguile/feature.c index ebb77cb08..ca83421eb 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -43,7 +43,7 @@ void scm_add_feature (const char *str) { SCM old = SCM_VARIABLE_REF (features_var); - SCM new = scm_cons (scm_from_locale_symbol (str), old); + SCM new = scm_cons (scm_from_utf8_symbol (str), old); SCM_VARIABLE_SET (features_var, new); } diff --git a/libguile/goops.c b/libguile/goops.c index 4b09f3311..cefc03bb5 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -2308,7 +2308,7 @@ fix_cpl (SCM c, SCM before, SCM after) static void make_stdcls (SCM *var, char *name, SCM meta, SCM super, SCM slots) { - SCM tmp = scm_from_locale_symbol (name); + SCM tmp = scm_from_utf8_symbol (name); *var = scm_basic_make_class (meta, tmp, scm_is_pair (super) ? super : scm_list_1 (super), @@ -2514,7 +2514,7 @@ make_class_from_template (char const *template, char const *type_name, SCM super { char buffer[100]; sprintf (buffer, template, type_name); - name = scm_from_locale_symbol (buffer); + name = scm_from_utf8_symbol (buffer); } else name = SCM_GOOPS_UNBOUND; diff --git a/libguile/gsubr.c b/libguile/gsubr.c index b6f261faf..ca92cc5f7 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -791,7 +791,7 @@ create_gsubr (int define, const char *name, scm_t_bits flags; /* make objtable */ - sname = scm_from_locale_symbol (name); + sname = scm_from_utf8_symbol (name); table = scm_c_make_vector (generic_loc ? 3 : 2, SCM_UNDEFINED); SCM_SIMPLE_VECTOR_SET (table, 0, scm_from_pointer (fcn, NULL)); SCM_SIMPLE_VECTOR_SET (table, 1, sname); diff --git a/libguile/instructions.c b/libguile/instructions.c index ef4a9ce17..f3b8963d2 100644 --- a/libguile/instructions.c +++ b/libguile/instructions.c @@ -72,7 +72,7 @@ fetch_instruction_table () { table[i].opcode = i; if (table[i].name) - table[i].symname = scm_from_locale_symbol (table[i].name); + table[i].symname = scm_from_utf8_symbol (table[i].name); else table[i].symname = SCM_BOOL_F; } diff --git a/libguile/load.c b/libguile/load.c index c6e688789..e5126ed68 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -998,7 +998,7 @@ init_build_info () for (i = 0; i < (sizeof (info) / sizeof (info[0])); i++) { - SCM key = scm_from_locale_symbol (info[i].name); + SCM key = scm_from_utf8_symbol (info[i].name); SCM val = scm_from_locale_string (info[i].value); *loc = scm_acons (key, val, *loc); } diff --git a/libguile/macros.c b/libguile/macros.c index bf351e4c1..5a4b9d6ca 100644 --- a/libguile/macros.c +++ b/libguile/macros.c @@ -64,7 +64,7 @@ scm_i_make_primitive_macro (const char *name, scm_t_macro_primitive fn) { SCM z = scm_words (scm_tc16_macro, 5); SCM_SET_SMOB_DATA_N (z, 1, (scm_t_bits)fn); - SCM_SET_SMOB_OBJECT_N (z, 2, scm_from_locale_symbol (name)); + SCM_SET_SMOB_OBJECT_N (z, 2, scm_from_utf8_symbol (name)); SCM_SET_SMOB_OBJECT_N (z, 3, SCM_BOOL_F); SCM_SET_SMOB_OBJECT_N (z, 4, SCM_BOOL_F); return z; diff --git a/libguile/memoize.c b/libguile/memoize.c index 801088ccb..e5ed62960 100644 --- a/libguile/memoize.c +++ b/libguile/memoize.c @@ -618,7 +618,7 @@ unmemoize_lexical (SCM n) char buf[16]; buf[15] = 0; snprintf (buf, 15, "<%u>", scm_to_uint32 (n)); - return scm_from_locale_symbol (buf); + return scm_from_utf8_symbol (buf); } static SCM diff --git a/libguile/modules.c b/libguile/modules.c index 63268fb07..7498549ee 100644 --- a/libguile/modules.c +++ b/libguile/modules.c @@ -153,7 +153,7 @@ convert_module_name (const char *name) ptr++; if (ptr > name) { - SCM sym = scm_from_locale_symboln (name, ptr-name); + SCM sym = scm_from_utf8_symboln (name, ptr-name); *tail = scm_cons (sym, SCM_EOL); tail = SCM_CDRLOC (*tail); } @@ -218,7 +218,7 @@ scm_c_export (const char *name, ...) if (name) { va_list ap; - SCM names = scm_cons (scm_from_locale_symbol (name), SCM_EOL); + SCM names = scm_cons (scm_from_utf8_symbol (name), SCM_EOL); SCM *tail = SCM_CDRLOC (names); va_start (ap, name); while (1) @@ -226,7 +226,7 @@ scm_c_export (const char *name, ...) const char *n = va_arg (ap, const char *); if (n == NULL) break; - *tail = scm_cons (scm_from_locale_symbol (n), SCM_EOL); + *tail = scm_cons (scm_from_utf8_symbol (n), SCM_EOL); tail = SCM_CDRLOC (*tail); } va_end (ap); @@ -734,7 +734,7 @@ scm_sym2var (SCM sym, SCM proc, SCM definep) SCM scm_c_module_lookup (SCM module, const char *name) { - return scm_module_lookup (module, scm_from_locale_symbol (name)); + return scm_module_lookup (module, scm_from_utf8_symbol (name)); } SCM @@ -754,7 +754,7 @@ scm_module_lookup (SCM module, SCM sym) SCM scm_c_lookup (const char *name) { - return scm_lookup (scm_from_locale_symbol (name)); + return scm_lookup (scm_from_utf8_symbol (name)); } SCM @@ -807,14 +807,14 @@ SCM scm_c_public_variable (const char *module_name, const char *name) { return scm_public_variable (convert_module_name (module_name), - scm_from_locale_symbol (name)); + scm_from_utf8_symbol (name)); } SCM scm_c_private_variable (const char *module_name, const char *name) { return scm_private_variable (convert_module_name (module_name), - scm_from_locale_symbol (name)); + scm_from_utf8_symbol (name)); } SCM @@ -849,14 +849,14 @@ SCM scm_c_public_lookup (const char *module_name, const char *name) { return scm_public_lookup (convert_module_name (module_name), - scm_from_locale_symbol (name)); + scm_from_utf8_symbol (name)); } SCM scm_c_private_lookup (const char *module_name, const char *name) { return scm_private_lookup (convert_module_name (module_name), - scm_from_locale_symbol (name)); + scm_from_utf8_symbol (name)); } SCM @@ -875,20 +875,20 @@ SCM scm_c_public_ref (const char *module_name, const char *name) { return scm_public_ref (convert_module_name (module_name), - scm_from_locale_symbol (name)); + scm_from_utf8_symbol (name)); } SCM scm_c_private_ref (const char *module_name, const char *name) { return scm_private_ref (convert_module_name (module_name), - scm_from_locale_symbol (name)); + scm_from_utf8_symbol (name)); } SCM scm_c_module_define (SCM module, const char *name, SCM value) { - return scm_module_define (module, scm_from_locale_symbol (name), value); + return scm_module_define (module, scm_from_utf8_symbol (name), value); } SCM @@ -907,7 +907,7 @@ scm_module_define (SCM module, SCM sym, SCM value) SCM scm_c_define (const char *name, SCM value) { - return scm_define (scm_from_locale_symbol (name), value); + return scm_define (scm_from_utf8_symbol (name), value); } SCM_DEFINE (scm_define, "define!", 2, 0, 0, diff --git a/libguile/options.c b/libguile/options.c index 286d9e109..8eecd35f1 100644 --- a/libguile/options.c +++ b/libguile/options.c @@ -133,7 +133,7 @@ get_documented_option_setting (const scm_t_option options[]) for (i = 0; options[i].name; ++i) { - SCM ls = scm_cons (scm_from_locale_string (options[i].doc), SCM_EOL); + SCM ls = scm_cons (scm_from_utf8_string (options[i].doc), SCM_EOL); switch (options[i].type) { case SCM_OPTION_BOOLEAN: @@ -278,7 +278,7 @@ scm_init_opts (SCM (*func) (SCM), scm_t_option options[]) for (i = 0; options[i].name; ++i) { - SCM name = scm_from_locale_symbol (options[i].name); + SCM name = scm_from_utf8_symbol (options[i].name); options[i].name = (char *) SCM_UNPACK (name); } func (SCM_UNDEFINED); diff --git a/libguile/print.c b/libguile/print.c index e462d1267..8846cd3af 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -432,7 +432,7 @@ scm_i_print_symbol_name (SCM sym, SCM port) void scm_print_symbol_name (const char *str, size_t len, SCM port) { - SCM symbol = scm_from_locale_symboln (str, len); + SCM symbol = scm_from_utf8_symboln (str, len); scm_i_print_symbol_name (symbol, port); } diff --git a/libguile/smob.c b/libguile/smob.c index ad58301b0..02ad1a511 100644 --- a/libguile/smob.c +++ b/libguile/smob.c @@ -438,7 +438,7 @@ scm_i_smob_apply_trampoline (SCM smob) name = "smob-apply"; objtable = scm_c_make_vector (2, SCM_UNDEFINED); SCM_SIMPLE_VECTOR_SET (objtable, 0, smob); - SCM_SIMPLE_VECTOR_SET (objtable, 1, scm_from_locale_symbol (name)); + SCM_SIMPLE_VECTOR_SET (objtable, 1, scm_from_utf8_symbol (name)); tramp = scm_make_program (SCM_SMOB_DESCRIPTOR (smob).apply_trampoline_objcode, objtable, SCM_BOOL_F); diff --git a/libguile/snarf.h b/libguile/snarf.h index 4aaff7c34..3931570f4 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -209,11 +209,11 @@ SCM_SNARF_INIT( \ # define SCM_SYMBOL(c_name, scheme_name) \ SCM_SNARF_HERE(static SCM c_name) \ -SCM_SNARF_INIT(c_name = scm_from_locale_symbol (scheme_name)) +SCM_SNARF_INIT(c_name = scm_from_utf8_symbol (scheme_name)) # define SCM_GLOBAL_SYMBOL(c_name, scheme_name) \ SCM_SNARF_HERE(SCM c_name) \ -SCM_SNARF_INIT(c_name = scm_from_locale_symbol (scheme_name)) +SCM_SNARF_INIT(c_name = scm_from_utf8_symbol (scheme_name)) #endif /* !SCM_SUPPORT_STATIC_ALLOCATION */ |