This adds a couple of new options for options parsing.
[m6w6/libmemcached] / libhashkit / jenkins.c
index 29d9454e3b229ed0ea872e9d92ef6340ff804aa3..53e35a8299e9d1d54687dae0b8e4a5d45b80e8bc 100644 (file)
@@ -56,10 +56,11 @@ use a bitmask.  For example, if you need only 10 bits, do
 In which case, the hash table should have hashsize(10) elements.
 */
 
-uint32_t hashkit_jenkins(const char *key, size_t length)
+uint32_t hashkit_jenkins(const char *key, size_t length, void *context)
 {
   uint32_t a,b,c;                                          /* internal state */
   union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */
+  (void)context;
 
   /* Set up the internal state */
   a = b = c = 0xdeadbeef + ((uint32_t)length) + JENKINS_INITVAL;
@@ -82,7 +83,7 @@ uint32_t hashkit_jenkins(const char *key, size_t length)
     }
 
     /*----------------------------- handle the last (probably partial) block */
-    /* 
+    /*
      * "k[2]&0xffffff" actually reads beyond the end of the string, but
      * then masks off the part it's not allowed to read.  Because the
      * string is aligned, the masked-off tail is in the same word as the
@@ -109,7 +110,7 @@ uint32_t hashkit_jenkins(const char *key, size_t length)
     default: return c;
     }
 
-  } 
+  }
   else if ((u.i & 0x1) == 0)
   {
     const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */
@@ -159,7 +160,7 @@ uint32_t hashkit_jenkins(const char *key, size_t length)
     default: return c;
     }
 
-  } 
+  }
   else
   {                        /* need to read the key one byte at a time */
 #endif /* little endian */