[CM] How to iterate through a hash-table in C?

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Tue Dec 8 10:16:07 PST 2020

Objects created in C are treated the same as those in Scheme by the GC.
There is a lag between when an object is created and when it is first
liable to be GC'd (set indirectly by GC_TEMPS_SIZE in s7.c).  The 
traversal creates a cons cell for each key/value pair, so if your table
has lots of entries, you need to gc protect at least the iterator.
I assume your hash-table is already protected.  Don't turn off the GC.
Unless you want to keep the entries returned by s7_iterate, you don't 
to gc protect them.

More information about the Cmdist mailing list