bridge/class-master/depend/pari/src/language/hash.c
/* the key 'k' may correspond to different values in the hash, return
 * one satisfying the selection callback */
the key 'k' may correspond to different values in the hash, return
one satisfying the selection callback
the key ' k ' may correspond to different values in the hash return one satisfying the selection callback
hashentry *
hash_select(hashtable *h, void *k, void *E,int(*select)(void *,hashentry *))
{
  ulong hash = h->hash(k);
  hashentry *e = h->table[ hash % h->len ];
  while (e)
  {
    if (hash == e->hash && h->eq(k, e->key) && select(E,e)) return e;
    e = e->next;
  }
  return NULL;
}
hashentry * hash_select ( hashtable * h , void * k , void * E , int ( * select ) ( void * , hashentry * ) ) { ulong hash = h -> hash ( k ) ; hashentry * e = h -> table [ hash % h -> len ] ; while ( e ) { if ( hash == e -> hash && h -> eq ( k , e -> key ) && select ( E , e ) ) return e ; e = e -> next ; } return NULL ; }
the key 'k' may correspond to different values in the hash, return
 one satisfying the selection callback
the key ' k ' may correspond to different values in the hash return one satisfying the selection callback