]> pd.if.org Git - nbds/blobdiff - include/struct.h
change the names of some variables and types for consistency across API's
[nbds] / include / struct.h
index bb5125a36b9cf7076dc9ff0b5c66f39b02c7143d..5894c0bb507eb3841312e49679d828817c3a8037 100644 (file)
@@ -3,17 +3,17 @@
 
 #define DOES_NOT_EXIST 0
 
-#define HT_EXPECT_NOT_EXISTS ( 0)
-#define HT_EXPECT_EXISTS     (-1)
-#define HT_EXPECT_WHATEVER   (-2)
+#define EXPECT_DOES_NOT_EXIST ( 0)
+#define EXPECT_EXISTS         (-1)
+#define EXPECT_WHATEVER       (-2)
 
-typedef struct hash_table_i *hash_table_t;
+typedef struct hti *hashtable_t;
 
-hash_table_t *ht_alloc (void);
-void ht_free (hash_table_t *ht);
-uint64_t ht_get (hash_table_t *ht, const char *key, uint32_t len);
-uint64_t ht_compare_and_set (hash_table_t *ht, const char *key, uint32_t key_len, uint64_t expected_val, uint64_t val);
-uint64_t ht_remove (hash_table_t *ht, const char *key, uint32_t len);
-uint64_t ht_count (hash_table_t *ht);
+hashtable_t *ht_alloc (void);
+void ht_free (hashtable_t *ht);
+uint64_t ht_get (hashtable_t *ht, const char *key, uint32_t len);
+uint64_t ht_compare_and_set (hashtable_t *ht, const char *key, uint32_t key_len, uint64_t expected_val, uint64_t val);
+uint64_t ht_remove (hashtable_t *ht, const char *key, uint32_t len);
+uint64_t ht_count (hashtable_t *ht);
 
 #endif//STRUCT_H