solv_vercmp_haiku(): Fix unnormalized return value
[platform/upstream/libsolv.git] / src / hash.h
index a606ca0..1d3222b 100644 (file)
 
 #include "pooltypes.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* value of a hash */
 typedef unsigned int Hashval;
-/* mask for hash, used as modulo operator to ensure 'wrapping' of hash
-   values -> hash table */
-typedef unsigned int Hashmask;
 
 /* inside the hash table, Ids are stored. Hash maps: string -> hash -> Id */
 typedef Id *Hashtable;
@@ -76,7 +77,7 @@ relhash(Id name, Id evr, int flags)
  * 
  * used for Hashtable 'modulo' operation
  */ 
-static inline Hashmask
+static inline Hashval
 mkmask(unsigned int num)
 {
   num *= 2;
@@ -85,4 +86,8 @@ mkmask(unsigned int num)
   return num * 2 - 1;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBSOLV_HASH_H */