www.delorie.com/gnu/docs/guile/guile_406.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

36.6 Obarray Symbol Manipulation

Guile's module mechanism uses obarrays, which are hash tables that map symbols to variables. Guile 1.4 included a group of primitives that could be used for the manipulation of the symbol-variable mappings in such obarrays.

However, considering the availability both of low-level procedures for operating on hash tables in general (see section 22.7.3 Hash Tables), and of a dedicated API for module-related operations (see section 31. Modules), the intermediate set of obarray primitives is no longer useful, and --- which is worse -- makes it more difficult to evolve the implementation of Guile's module system. Hence this set of primitives has now been deprecated.

If you have code using these functions, please change it to use either hash table or module-related operations.

Deprecated Scheme Procedure: gentemp [prefix [obarray]]
Deprecated C Function: scm_gentemp (prefix, obarray)
Create a new symbol with a name unique in an obarray. The name is constructed from an optional string prefix and a counter value. The default prefix is t. The obarray is specified as a second optional argument. Default is the system obarray where all normal symbols are interned. The counter is increased by 1 at each call. There is no provision for resetting the counter.

Deprecated Scheme Procedure: intern-symbol obarray string
Deprecated C Function: scm_intern_symbol (obarray, string)
Add a new symbol to obarray with name string, bound to an unspecified initial value. The symbol table is not modified if a symbol with this name is already present.

Deprecated Scheme Procedure: symbol-interned? obarray string
Deprecated C Function: scm_symbol_interned_p (obarray, string)
Return #t if obarray contains a symbol with name string, and #f otherwise.

Deprecated Scheme Procedure: unintern-symbol obarray string
Deprecated C Function: scm_unintern_symbol (obarray, string)
Remove the symbol with name string from obarray. This function returns #t if the symbol was present and #f otherwise.

Deprecated Scheme Procedure: string->obarray-symbol obarray string [soft?]
Deprecated C Function: scm_string_to_obarray_symbol (obarray, string, soft_p)
Intern a new symbol in obarray, a symbol table, with name string.

If obarray is #f, use the default system symbol table. If obarray is #t, the symbol should not be interned in any symbol table; merely return the pair (symbol . #<undefined>).

The soft? argument determines whether new symbol table entries should be created when the specified symbol is not already present in obarray. If soft? is specified and is a true value, then new entries should not be added for symbols not already present in the table; instead, simply return #f.

Deprecated Scheme Procedure: symbol-binding obarray string
Deprecated C Function: scm_symbol_binding (obarray, string)
Look up in obarray the symbol whose name is string, and return the value to which it is bound. If obarray is #f, use the global symbol table. If string is not interned in obarray, an error is signalled.

Deprecated Scheme Procedure: symbol-bound? obarray string
Deprecated C Function: scm_symbol_bound_p (obarray, string)
Return #t if obarray contains a symbol with name string bound to a defined value. This differs from symbol-interned? in that the mere mention of a symbol usually causes it to be interned; symbol-bound? determines whether a symbol has been given any meaningful value.

Deprecated Scheme Procedure: symbol-set! obarray string value
Deprecated C Function: scm_symbol_set_x (obarray, string, value)
Find the symbol in obarray whose name is string, and rebind it to value. An error is signalled if string is not present in obarray.

Deprecated Scheme Procedure: builtin-bindings
Deprecated C Function: scm_builtin_bindings
Create and return a copy of the global symbol table, removing all unbound symbols.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003