mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
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.
This commit is contained in:
parent
f80d15c59e
commit
25d50a051d
15 changed files with 33 additions and 33 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue