summaryrefslogtreecommitdiff
path: root/src/emap/judyarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/judyarray.h')
-rw-r--r--src/emap/judyarray.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/emap/judyarray.h b/src/emap/judyarray.h
new file mode 100644
index 0000000..ad9e1f0
--- /dev/null
+++ b/src/emap/judyarray.h
@@ -0,0 +1,29 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2018 Evol developers
+
+#ifndef EVOL_JUDY_ARRAY
+#define EVOL_JUDY_ARRAY
+
+#include "common/hercules.h"
+#include "common/db.h"
+
+struct judy_interface
+{
+ int64 last_id;
+ void *arrays;
+ int64 (*new_array) (void);
+ bool (*clear_array) (int64 id);
+ bool (*destroy_array) (int64 id);
+ bool (*array_exists) (int64 id);
+ int64 (*array_size) (int64 id);
+ const struct DBData* (*getvalue) (int64 id, const char *key, const struct DBData *defval);
+ bool (*setvalue) (int64 id, const char *key, struct DBData *value);
+};
+
+void judy_defaults(void);
+void judy_init(void);
+void judy_final(void);
+
+HPShared struct judy_interface *judy;
+
+#endif // EVOL_JUDY_ARRAY