diff options
author | Test_User <hax@andrewyu.org> | 2023-05-03 22:57:53 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2023-05-03 22:57:53 -0400 |
commit | e4b5445b3ca844e568a84abbf931a026a6ca6226 (patch) | |
tree | 9d9d615406c5a91036ebcd5b23bd8af30d3e8f3d /table.h | |
parent | ec8b1682e86535333c34966f6aafee349e609641 (diff) | |
download | c_coupserv-e4b5445b3ca844e568a84abbf931a026a6ca6226.tar.gz c_coupserv-e4b5445b3ca844e568a84abbf931a026a6ca6226.zip |
C HaxServ
Diffstat (limited to 'table.h')
-rw-r--r-- | table.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#pragma once + +#include "types.h" + +struct table_index { + struct string name; + void *ptr; +}; + +struct table { + struct table_index *array; + size_t len; +}; + +extern int set_table_index(struct table *tbl, struct string name, void *ptr); +extern void * get_table_index(struct table tbl, struct string name); +extern void * remove_table_index(struct table *tbl, struct string name); // returns same as get_table_index |