Convert constraint.c to C
[satune.git] / src / structs.h
1 #ifndef STRUCTS_H
2 #define STRUCTS_H
3 #include "vector.h"
4 #include "hashtable.h"
5 #include "hashset.h"
6 #include "classlist.h"
7
8 VectorDef(Int, uint64_t, 4);
9 VectorDef(Boolean, Boolean *, 4);
10 VectorDef(Constraint, Constraint *, 4);
11 VectorDef(Void, void *, 4);
12
13 inline unsigned int Ptr_hash_function(void * hash) {
14         return (unsigned int)((uint64_t)hash >> 4);
15 }
16
17 inline bool Ptr_equals(void * key1, void * key2) {
18         return key1 == key2;
19 }
20
21 HashTableDef(Void, void *, void *, Ptr_hash_function, Ptr_equals);
22 HashSetDef(Void, void *, Ptr_hash_function, Ptr_equals);
23 #endif