mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +02:00
* strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
scm_i_string_writable_chars, scm_i_string_stop_writing): New, to replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all uses. (scm_i_make_string, scm_c_make_string): New, to replace scm_allocate_string. Updated all uses. (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Deprecated. (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string, scm_str2string, scm_makfrom0str, scm_makfrom0str_opt): Discouraged. Replaced all uses with scm_from_locale_string or similar, as appropriate. (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x, scm_c_substring, scm_c_substring_shared, scm_c_substring_copy, scm_substring_shared, scm_substring_copy): New. * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS, SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol, scm_str2symbol, scm_mem2uninterned_symbol): Discouraged. (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str): Deprecated. (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS, SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed. (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln): New, to replace scm_str2symbol and scm_mem2symbol, respectively. Updated all uses. (scm_gensym): Generate only the number suffix in the buffer, just string-append the prefix.
This commit is contained in:
parent
f76c6bb234
commit
cc95e00ac6
45 changed files with 623 additions and 494 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1998,2000,2001,2002, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998,2000,2001,2002, 2003, 2004 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
|
||||
|
@ -111,7 +111,8 @@ convert_module_name (const char *name)
|
|||
ptr++;
|
||||
if (ptr > name)
|
||||
{
|
||||
*tail = scm_cons (scm_mem2symbol (name, ptr-name), SCM_EOL);
|
||||
SCM sym = scm_from_locale_symboln (name, ptr-name);
|
||||
*tail = scm_cons (sym, SCM_EOL);
|
||||
tail = SCM_CDRLOC (*tail);
|
||||
}
|
||||
name = ptr;
|
||||
|
@ -185,7 +186,7 @@ scm_c_export (const char *name, ...)
|
|||
if (name)
|
||||
{
|
||||
va_list ap;
|
||||
SCM names = scm_cons (scm_str2symbol (name), SCM_EOL);
|
||||
SCM names = scm_cons (scm_from_locale_symbol (name), SCM_EOL);
|
||||
SCM *tail = SCM_CDRLOC (names);
|
||||
va_start (ap, name);
|
||||
while (1)
|
||||
|
@ -193,7 +194,7 @@ scm_c_export (const char *name, ...)
|
|||
const char *n = va_arg (ap, const char *);
|
||||
if (n == NULL)
|
||||
break;
|
||||
*tail = scm_cons (scm_str2symbol (n), SCM_EOL);
|
||||
*tail = scm_cons (scm_from_locale_symbol (n), SCM_EOL);
|
||||
tail = SCM_CDRLOC (*tail);
|
||||
}
|
||||
va_end (ap);
|
||||
|
@ -485,7 +486,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_str2symbol (name));
|
||||
return scm_module_lookup (module, scm_from_locale_symbol (name));
|
||||
}
|
||||
|
||||
SCM
|
||||
|
@ -505,7 +506,7 @@ scm_module_lookup (SCM module, SCM sym)
|
|||
SCM
|
||||
scm_c_lookup (const char *name)
|
||||
{
|
||||
return scm_lookup (scm_str2symbol (name));
|
||||
return scm_lookup (scm_from_locale_symbol (name));
|
||||
}
|
||||
|
||||
SCM
|
||||
|
@ -521,7 +522,7 @@ scm_lookup (SCM sym)
|
|||
SCM
|
||||
scm_c_module_define (SCM module, const char *name, SCM value)
|
||||
{
|
||||
return scm_module_define (module, scm_str2symbol (name), value);
|
||||
return scm_module_define (module, scm_from_locale_symbol (name), value);
|
||||
}
|
||||
|
||||
SCM
|
||||
|
@ -540,7 +541,7 @@ scm_module_define (SCM module, SCM sym, SCM value)
|
|||
SCM
|
||||
scm_c_define (const char *name, SCM value)
|
||||
{
|
||||
return scm_define (scm_str2symbol (name), value);
|
||||
return scm_define (scm_from_locale_symbol (name), value);
|
||||
}
|
||||
|
||||
SCM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue