[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: hash table

Quoting "Paul Steckler":
> It doesn't look like the MzScheme libraries have procedures for directly
> manipulating hash tables in C.

Looks like I never documented the C functions for hash tables.

The following functions work on simple hash tables:

 Scheme_Hash_Table *scheme_make_hash_table(int type);

 void scheme_hash_set(Scheme_Hash_Table *table, Scheme_Object *key,
                      Scheme_Object *val);

 Scheme_Object *scheme_hash_get(Scheme_Hash_Table *table, Scheme_Object *key);

where `type' is usually `SCHEME_hash_ptr', and the rest is obvious. The
macro SCHEME_HASHTP() recognizes such hash tables

There's also a "bucket table" interface (recognized by SCHEME_BUCKTP())
for more complex sorts of tables, including weak hash tables.

The Scheme "hash table" type includes both kinds of tables at the C

I'll document this in the near future.