Fixing compile issues
This commit is contained in:
11
table.hpp
11
table.hpp
@@ -11,9 +11,6 @@
|
||||
|
||||
Hash 0 is reserved for empty hash table entry
|
||||
*/
|
||||
|
||||
// #define TABLE_ALLOCATOR_TYPE Allocator
|
||||
|
||||
#ifndef TABLE_PRIVATE_FUNCTION
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define TABLE_PRIVATE_FUNCTION __attribute__((unused)) static
|
||||
@@ -22,6 +19,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef TABLE_Allocator
|
||||
#define TABLE_Allocator void *
|
||||
#endif
|
||||
|
||||
#ifndef TABLE_ALLOCATE
|
||||
#include <stdlib.h>
|
||||
#define TABLE_ALLOCATE(allocator, size) malloc(size)
|
||||
@@ -74,9 +75,7 @@ struct Table {
|
||||
Value value;
|
||||
};
|
||||
|
||||
#ifdef TABLE_ALLOCATOR_TYPE
|
||||
TABLE_ALLOCATOR_TYPE allocator;
|
||||
#endif
|
||||
TABLE_Allocator allocator;
|
||||
size_t len, cap;
|
||||
Entry *values;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user