We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 163b4d8 commit a02019aCopy full SHA for a02019a
1 file changed
include/table.h
@@ -0,0 +1,28 @@
1
+/* include/table.h */
2
+#ifndef PROXPL_TABLE_H
3
+#define PROXPL_TABLE_H
4
+
5
+#include "common.h"
6
+#include "value.h"
7
8
+typedef struct {
9
+ ObjString* key;
10
+ Value value;
11
+} Entry;
12
13
14
+ int count;
15
+ int capacity;
16
+ Entry* entries;
17
+} Table;
18
19
+void initTable(Table* table);
20
+void freeTable(Table* table);
21
+bool tableGet(Table* table, ObjString* key, Value* value);
22
+bool tableSet(Table* table, ObjString* key, Value value);
23
+bool tableDelete(Table* table, ObjString* key);
24
+void tableAddAll(Table* from, Table* to);
25
+ObjString* tableFindString(Table* table, const char* chars, int length, uint32_t hash);
26
27
+#endif
28
0 commit comments