src/libs/hash_lib.c
void* hash_table_access(Hash_Table const* table, int64 key) {
  // {{{ access hash table using simple key compare
  uns               index  = HASH_INDEX(table, key);
  Hash_Table_Entry* bucket = table->entries[index];
  Hash_Table_Entry* temp;

  for(temp = bucket; temp != NULL; temp = temp->next)
    if(temp->key == key)
      return temp->data;

  return NULL;
  // }}}
}
/**************************************************************************************/
/* hash_table_access: access the hash table.  Return the data pointer
   if it hits, NULL otherwise */
access the hash table.  Return the data pointer
if it hits, NULL otherwise
access the hash table . Return the data pointer if it hits NULL otherwise
void* hash_table_access(Hash_Table const* table, int64 key) {
  uns               index  = HASH_INDEX(table, key);
  Hash_Table_Entry* bucket = table->entries[index];
  Hash_Table_Entry* temp;
  for(temp = bucket; temp != NULL; temp = temp->next)
    if(temp->key == key)
      return temp->data;
  return NULL;
}
void * hash_table_access ( Hash_Table const * table , int64 key ) { uns index = HASH_INDEX ( table , key ) ; Hash_Table_Entry * bucket = table -> entries [ index ] ; Hash_Table_Entry * temp ; for ( temp = bucket ; temp != NULL ; temp = temp -> next ) if ( temp -> key == key ) return temp -> data ; return NULL ; }
hash_table_access: access the hash table.
hash_table_access : access the hash table .
// {{{ access hash table using simple key compare // }}}