mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
(scm_memory_error): Do not try to throw, just abort.
Throwing will not work anyway. * 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
6087fad9c7
commit
468e87a786
1 changed files with 5 additions and 8 deletions
|
@ -135,7 +135,7 @@ SCM_DEFINE (scm_strerror, "strerror", 1, 0, 0,
|
|||
SCM_F_WIND_EXPLICITLY);
|
||||
scm_mutex_lock (&scm_i_misc_mutex);
|
||||
|
||||
ret = scm_makfrom0str (SCM_I_STRERROR (scm_to_int (err)));
|
||||
ret = scm_from_locale_string (SCM_I_STRERROR (scm_to_int (err)));
|
||||
|
||||
scm_frame_end ();
|
||||
return ret;
|
||||
|
@ -215,7 +215,7 @@ scm_error_num_args_subr (const char *subr)
|
|||
scm_error (scm_args_number_key,
|
||||
NULL,
|
||||
"Wrong number of arguments to ~A",
|
||||
scm_list_1 (scm_makfrom0str (subr)),
|
||||
scm_list_1 (scm_from_locale_string (subr)),
|
||||
SCM_BOOL_F);
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ scm_wrong_type_arg (const char *subr, int pos, SCM bad_value)
|
|||
void
|
||||
scm_wrong_type_arg_msg (const char *subr, int pos, SCM bad_value, const char *szMessage)
|
||||
{
|
||||
SCM msg = scm_makfrom0str(szMessage);
|
||||
SCM msg = scm_from_locale_string (szMessage);
|
||||
if (pos == 0) {
|
||||
scm_error (scm_arg_type_key,
|
||||
subr, "Wrong type argument (expecting ~A): ~S",
|
||||
|
@ -256,11 +256,8 @@ SCM_GLOBAL_SYMBOL (scm_memory_alloc_key, "memory-allocation-error");
|
|||
void
|
||||
scm_memory_error (const char *subr)
|
||||
{
|
||||
scm_error (scm_memory_alloc_key,
|
||||
subr,
|
||||
"Memory allocation error",
|
||||
SCM_BOOL_F,
|
||||
SCM_BOOL_F);
|
||||
fprintf (stderr, "FATAL: memory error in %s\n", subr);
|
||||
abort ();
|
||||
}
|
||||
|
||||
SCM_GLOBAL_SYMBOL (scm_misc_error_key, "misc-error");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue