Add dict type

This commit is contained in:
2022-08-14 18:18:34 +03:00
parent 2ad4665e17
commit aa4828b4ed
15 changed files with 1222 additions and 177 deletions
+18
View File
@@ -0,0 +1,18 @@
/* This software is licensed by the MIT License, see LICENSE file */
/* Copyright © 2022 Gregory Lirent */
#include "../dict.h"
#ifndef LIBCDSB_EXTRA_DICT_H
#define LIBCDSB_EXTRA_DICT_H
#define dict_foreach(x, data, callback) libcdsb_dict_foreach(x, data, callback, 0)
extern bool libcdsb_dict_update(vtype_dict* x, const void* k, vtype kt, const void* v, vtype vt) LIBCDSB_nt__ LIBCDSB_nn124__;
extern int libcdsb_dict_get (vtype_dict* x, const void* key, vtype key_type, void* data, dict_access_callback, bool cut) LIBCDSB_nt__ LIBCDSB_nn1__;
extern int libcdsb_dict_foreach(vtype_dict* x, void* data, dict_access_callback, bool flush) LIBCDSB_nt__ LIBCDSB_nn13__;
extern bool libcdsb_dict_shrink_to_fit(vtype_dict* x) LIBCDSB_nt__ LIBCDSB_nn1__;
#endif /* LIBCDSB_EXTRA_DICT_H */