src/stdlib/hashtab.c
/*================================
 * begin_hashtab -- Create new iterator for hash table
 *==============================*/
- Create new iterator for hash table
- Create new iterator for hash table
HASHTAB_ITER
begin_hashtab (HASHTAB tab)
{
	HASHTAB_ITER tabit=0;
	ASSERT(tab);
	ASSERT(tab->magic == hashtab_magic);
	tabit = (HASHTAB_ITER)stdalloc(sizeof(*tabit));
	tabit->magic = hashtab_iter_magic;
	tabit->hashtab = tab;
	return tabit;
}
HASHTAB_ITER begin_hashtab ( HASHTAB tab ) { HASHTAB_ITER tabit = 0 ; ASSERT ( tab ) ; ASSERT ( tab -> magic == hashtab_magic ) ; tabit = ( HASHTAB_ITER ) stdalloc ( sizeof ( * tabit ) ) ; tabit -> magic = hashtab_iter_magic ; tabit -> hashtab = tab ; return tabit ; }
begin_hashtab -- Create new iterator for hash table
begin_hashtab -- Create new iterator for hash table
/* table iterator starts at index=0, enext=0 */ /* stdalloc gave us all zero memory */