pike.git / src / hashtable.c

version» Context lines:

pike.git/src/hashtable.c:1:   /*\ - ||| This file a part of uLPC, and is copyright by Fredrik Hubinette - ||| uLPC is distributed as GPL (General Public License) + ||| This file a part of Pike, and is copyright by Fredrik Hubinette + ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h"   #include "hashtable.h"   #include "stralloc.h"   #include "config.h"   #include "stuff.h"   #include "error.h"    - static unsigned INT32 gobble(struct lpc_string *s) + static unsigned INT32 gobble(struct pike_string *s)   {    unsigned INT32 i;    i=my_hash_string(s);    i+=i >> 3;    i+=i >> 7;    i+=i >> 12;    return i;   }      /*    * Search hash for a specific string.    */ - struct hash_entry *hash_lookup(struct hash_table *h, struct lpc_string *s) + struct hash_entry *hash_lookup(struct hash_table *h, struct pike_string *s)   {    struct hash_entry *e, **prev, **base;       if(!h) return 0;    base = prev = h->htable + (gobble(s) & h->mask);    for( ;(e = *prev); prev= &e->next)    {    if(s == e->s)    {    /* Teleport entry to beginning of line */