src/hash_key.c

changeset 690
2c2304622981
parent 678
78f943d76f50
child 890
54565fd74e74
--- a/src/hash_key.c	Thu Apr 20 19:13:25 2023 +0200
+++ b/src/hash_key.c	Fri Apr 21 18:38:18 2023 +0200
@@ -30,7 +30,7 @@
 #include <string.h>
 
 void cx_hash_murmur(CxHashKey *key) {
-    unsigned char const *data = key->data.cbytes;
+    unsigned char const *data = key->data;
     if (data == NULL) {
         // extension: special value for NULL
         key->hash = 1574210520u;
@@ -83,7 +83,7 @@
 
 CxHashKey cx_hash_key_str(char const *str) {
     CxHashKey key;
-    key.data.cstr = str;
+    key.data = str;
     key.len = str == NULL ? 0 : strlen(str);
     cx_hash_murmur(&key);
     return key;
@@ -94,7 +94,7 @@
         size_t len
 ) {
     CxHashKey key;
-    key.data.cbytes = bytes;
+    key.data = bytes;
     key.len = len;
     cx_hash_murmur(&key);
     return key;
@@ -105,7 +105,7 @@
         size_t len
 ) {
     CxHashKey key;
-    key.data.cobj = obj;
+    key.data = obj;
     key.len = len;
     cx_hash_murmur(&key);
     return key;

mercurial