/[crust]/crust/libs/CoreFoundation/CFHashtable.c
ViewVC logotype

Diff of /crust/libs/CoreFoundation/CFHashtable.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jrydberg, Mon Aug 27 18:38:20 2001 UTC revision 1.2 by jrydberg, Mon Sep 17 12:29:21 2001 UTC
# Line 37  void  destroy_ihash (void *instp); Line 37  void  destroy_ihash (void *instp);
37    
38  CFTypeID _CFHashtableTypeID;  CFTypeID _CFHashtableTypeID;
39    
40  /* CoreFoundation runtime class for GFContext.  */  /* CoreFoundation runtime class for CFHashtable.  */
41  CFRuntimeClass _CFHashtableRuntimeClass =  CFRuntimeClass _CFHashtableRuntimeClass =
42    {    {
43      0,                                  /* version */      0,                                  /* version */
# Line 425  _ihash_nextprime (unsigned n) Line 425  _ihash_nextprime (unsigned n)
425      return primes[top];      return primes[top];
426    }    }
427  }  }
428    
429    /* 31 bit hash function */
430    int
431    CFStringHashFunction (char *key)
432    {
433      const char *p = key;
434      int h = *p;
435    
436      
437      if (h)
438        for (p += 1; *p != '\0'; p++)
439          h = (h << 5) - h + *p;
440      return h;
441    }
442    
443    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26