[plt-scheme] hash_table_set
Hi there,
I am playing around with hashtables in an extension. From the docs:
> void scheme_hash_set(Scheme_Hash_Table *table, Scheme_Object *key,
Scheme_Object *val)
> Sets the current value for key in table to val. If val is NULL, the
key is unmapped in table.
But this:
Scheme_Hash_Table* myStore = scheme_make_hash_table(SCHEME_hash_ptr);
Scheme_Object *p = scheme_make_integer(12);
scheme_hash_set(myStore,p,scheme_make_integer(1));
scheme_hash_set(myStore,p,NULL);
assert (myStore->count == 0);
fails (myStore->count is 1)
Am I missing something here? My goal is to remove p from the list of keys.
Thanks in advance,
-pp