* libguile/deprecated.h
* libguile/deprecated.c (SCM_ILOC00, SCM_IDINC, SCM_IDSTMSK)
(scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings)
(scm_s_variable, scm_s_clauses, scm_s_formals, SCM_EVALIM2)
(SCM_EVALIM, SCM_XEVAL, SCM_XEVALCAR): Remove these macros and
constants, deprecated in 2003.
(scm_the_root_module): Undeprecate, it's actually a useful function,
that other parts of the code use.
* libguile/modules.h (scm_the_root_module): Undeprecated.
* libguile/modules.c (scm_the_root_module): Rename from
the_root_module. Use it in the rest of this file.
* libguile/deprecated.c (intern_obarray_soft): new function
(scm_intern_obarray_soft, scm_string_to_obarray_symbol): use
intern_obarray_soft
(scm_gentemp): don't unpack string chars, use intern_obarray_soft
* libguile/discouraged.c (scm_make_keyword_from_dash_symbol): use
symbol accessor
* libguile/arrays.h:
* libguile/arrays.c:
* libguile/generalized-arrays.h:
* libguile/generalized-arrays.c: Move some generic functionality out of
arrays.c to a new file.
* libguile/array-map.c:
* libguile/deprecated.c:
* libguile/init.c: Update includers.
* libguile/arrays.h:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/deprecated.c: Remove "enclosed arrays". The only user-facing
procedures that this affects are scm_enclose_array / enclose-array. If
enclosed arrays are added back, it should be through the generic array
interface; but really, it sounds like something that would be better
implemented in Scheme.
hashtable and guardian machinery but call the relevant functions
directly.
* guardians.h, guardians.c, deprecated.h,
deprecated.c (scm_destroy_guardian_x, scm_guardian_greedy_p,
scm_guardian_destroyed_p, scm_guard, scm_get_one_zombie):
Deprecated and moved into deprecated.[ch].
* guardians.h, guardians.c: Mostly rewritten.
(scm_i_init_guardians_for_gc,
scm_i_identify_inaccessible_guardeds,
scm_i_mark_inaccessible_guardeds): New.
* weaks.h, weaks.c (SCM_I_WVECT_TYPE, SCM_I_SET_WVECT_TYPE): New.
(SCM_I_WVECT_N_ITEMS, SCM_I_SET_WVECT_N_ITEMS): New.
(SCM_WVECTF_NOSCAN, SCM_WVECT_NOSCAN_P): Removed.
(scm_weaks_prehistory): Removed.
(scm_i_init_weak_vectors_for_gc, scm_i_mark_weak_vector,
scm_i_mark_weak_vectors_non_weaks,
scm_i_remove_weaks_from_weak_vectors, scm_i_remove_weaks): New.
(scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
scm_scan_weak_vectors): Removed.
* hashtab.h (scm_i_scan_weak_hashtables): New.
* hashtab.c (make_hash_table, scm_i_rehash): Do not use
SCM_WVECTF_NOSCAN.
(hashtable_print): Use SCM_HASHTABLE_N_ITEMS instead of
t->n_items.
(scan_weak_hashtables, scm_i_scan_weak_hashtables): Renamed former
to latter. Do not scan the alists themselves, this is done by the
weak vector code now. Just update the element count.
* vectors.h (SCM_I_WVECT_TYPE, SCM_I_WVECT_EXTRA): Renamed former
to latter. The type is now only part of the cell word.
(SCM_I_SET_WVECT_TYPE, SCM_I_SET_WVECT_EXTRA): Likewise.
* init.c (scm_i_init_guile): Do not call scm_weaks_prehistory.
(scm_vector_elements, scm_vector_writable_elements,
scm_generalized_vector_get_handle): Moved to vectors.[hc] from
unif.[hc].
(SCM_SIMPLE_VECTOR_LOC): Removed.
(SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
(scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
latter. Changed use in eq.c.
Moved from string.h to deprecated.h.
* deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
* strings.h, strings.c (SCM_MAKE_STRING_TAG): Rename dto
SCM_I_MAKE_STRING_TAG, changed all uses.
(SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
respectively. For a short time, the old names are still there as
aliases. Not all uses have been changed yet, but the ones in
strings.c have.
(SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
SCM_T_BITS_MAX.
(scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
scm_take_locale_string, scm_take_locale_stringn,
scm_to_locale_string, scm_to_locale_stringn,
scm_to_locale_stringbuf): New.
(scm_c_string2str, scm_c_substring2str): Deprecated by moving to
deprecated.[hc]. Implemented in terms of the new functions above.
(scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
scm_makfrom0str): Reimplemented in terms of the new functions from
above. They will be discouraged shortly.
(scm_substring): Do not use scm_mem2string.
(scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
to replace similar code from posix.c, simpos.c, and dynl.c.
(scm_string_append): Use memcpy instead of explicit loop. Do not
use register keyword. Use plain 'char' instead of 'unsigned
char'.
SCM_I_INUMP, SCM_I_NINUMP and SCM_I_INUM, respectively and adding
deprecated versions to deprecated.h and deprecated.c. Changed all
uses to either use the SCM_I_ variants or scm_is_*, scm_to_*, or
scm_from_*, as appropriate.
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
* deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
eval.h to eval.c.
* deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
(SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
renamed to ISYMNUM.
* eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
(scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
Extracted printing of ilocs and isyms to guile internal functions
scm_i_print_iloc, scm_i_print_isym of eval.c.
scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings,
scm_s_variable, scm_s_clauses, scm_s_formals. In eval.c the
definitions are make static and renamed from scm_s_xxx to s_xxx.
In deprecated.c the original definitions are copied.
* deprecated.h, eval.c, eval: Deprecated SCM_EVALIM2, SCM_EVALIM,
SCM_XEVAL and SCM_XEVALCAR. The macro definitions are moved from
eval.h into eval.c and a copy (slightly modified to work in user
code) is placed into deprecated.h.
* eval.c: Use the local static s_xxx definitions instead of the
scm_s_xxx definitions throughout.
scm_make_subr_with_generic, scm_make_subr_opt,
scm_call_catching_errors, scm_make_smob_type_mfpe, scm_set_smob_mfpe,
scm_strprint_obj, scm_read_0str, scm_eval_0str, SCM_CHARS, SCM_UCHARS,
SCM_LENGTH): Re-added from the release_1_6 branch. Some have been
slightly rewritten. (scm_i_object_chars, scm_i_object_length): New,
to support SCM_CHARS, SCM_UCHARS, and SCM_LENTH.