mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
Deprecate symbol properties.
* libguile/strings.c (scm_i_make_symbol): Remove 'props' argument. Use 3 words instead of 'scm_double_cell'. * libguile/strings.h: Adjust accordingly. * libguile/symbols.c (scm_i_str2symbol, scm_i_str2uninterned_symbol): Likewise. (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x, scm_symbol_pset_x): Move to... * libguile/deprecated.c: ... here. Rewrite in terms of object properties. (symbol_function_slot, symbol_property_slot): New variables. * libguile/symbols.h (SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC) (SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS) (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x) (scm_symbol_pset_x): Move to... * libguile/deprecated.h: ... here. Mark declarations as 'SCM_DEPRECATED'. * module/system/base/types.scm (cell->object): Remove 'props' field for %TC7-SYMBOL. * doc/ref/api-data.texi (Symbol Props): Remove. * NEWS: Update.
This commit is contained in:
parent
2ebf039707
commit
8e2e2ceb17
9 changed files with 87 additions and 150 deletions
|
@ -760,16 +760,19 @@ scm_i_string_set_x (SCM str, size_t p, scm_t_wchar chr)
|
|||
#define SYMBOL_STRINGBUF SCM_CELL_OBJECT_1
|
||||
|
||||
SCM
|
||||
scm_i_make_symbol (SCM name, scm_t_bits flags,
|
||||
unsigned long hash, SCM props)
|
||||
scm_i_make_symbol (SCM name, scm_t_bits flags, unsigned long hash)
|
||||
{
|
||||
SCM buf;
|
||||
SCM buf, symbol;
|
||||
size_t length = STRING_LENGTH (name);
|
||||
|
||||
name = scm_i_substring_copy (name, 0, length);
|
||||
buf = STRING_STRINGBUF (name);
|
||||
return scm_double_cell (scm_tc7_symbol | flags, SCM_UNPACK (buf),
|
||||
(scm_t_bits) hash, SCM_UNPACK (props));
|
||||
|
||||
symbol = scm_words (scm_tc7_symbol | flags, 3);
|
||||
SCM_SET_CELL_WORD_1 (symbol, SCM_UNPACK (buf));
|
||||
SCM_SET_CELL_WORD_2 (symbol, hash);
|
||||
|
||||
return symbol;
|
||||
}
|
||||
|
||||
/* Returns the number of characters in SYM. This may be different
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue