Update map (vtype_variable)
This commit is contained in:
+9
-9
@@ -8,7 +8,7 @@
|
||||
#ifndef LIBCDSB_MAP_H
|
||||
#define LIBCDSB_MAP_H
|
||||
|
||||
typedef int (*map_access_callback)(const void* key, vtype key_type, void* value, vtype value_type, void* data);
|
||||
typedef int (*map_access_callback)(vtype_variable key, vtype_variable value, void* data);
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
@@ -16,10 +16,10 @@ extern void map_init(vtype_map* x, vtype key_type) Nonnull__(1);
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
#define map_pop(x, key, data, callback) libcdsb_map_find (x, _LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key), data, callback, 1)
|
||||
#define map_get(x, key, data, callback) libcdsb_map_find (x, _LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key), data, callback, 0)
|
||||
#define map_update(x, key, value) libcdsb_map_update (x, _LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key), _LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value), 0, 0)
|
||||
#define map_inject(x, key, value) libcdsb_map_inject (x, _LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key), _LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value), 0, 0)
|
||||
#define map_pop(x, key, data, callback) libcdsb_map_find (x, libcdsb_variable_build(_LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key)), data, callback, 1)
|
||||
#define map_get(x, key, data, callback) libcdsb_map_find (x, libcdsb_variable_build(_LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key)), data, callback, 0)
|
||||
#define map_update(x, key, value) libcdsb_map_update (x, libcdsb_variable_build(_LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key)), libcdsb_variable_build(_LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value)), 0, 0)
|
||||
#define map_inject(x, key, value) libcdsb_map_inject (x, libcdsb_variable_build(_LIBCDSB_value_pointer(key), _LIBCDSB_vtypeof(key)), libcdsb_variable_build(_LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value)), 0, 0)
|
||||
#define map_foreach(x, data, callback) libcdsb_map_foreach(x, data, callback, RBFOREACH_UNSPECIFIED, 0)
|
||||
#define map_remove(x, key) map_pop (x, key, 0, 0)
|
||||
|
||||
@@ -27,9 +27,9 @@ extern void map_init(vtype_map* x, vtype key_type) Nonnull__(1);
|
||||
|
||||
/*#####################################################################################################################*/
|
||||
|
||||
extern bool libcdsb_map_update (vtype_map* x, const void* key, vtype key_type, const void* value, vtype value_type, void* data, map_access_callback) Nonnull__(1);
|
||||
extern bool libcdsb_map_inject (vtype_map* x, const void* key, vtype key_type, const void* value, vtype value_type, void* data, map_access_callback) Nonnull__(1);
|
||||
extern int libcdsb_map_find (vtype_map* x, const void* key, vtype key_type, void* data, map_access_callback, bool cut) Nonnull__(1);
|
||||
extern int libcdsb_map_foreach(vtype_map* x, void* data, map_access_callback, rbforeach_t, bool flush) Nonnull__(1,3);
|
||||
extern bool libcdsb_map_update (vtype_map* x, vtype_variable key, vtype_variable value, void* data, map_access_callback) Nonnull__(1);
|
||||
extern bool libcdsb_map_inject (vtype_map* x, vtype_variable key, vtype_variable value, void* data, map_access_callback) Nonnull__(1);
|
||||
extern int libcdsb_map_find (vtype_map* x, vtype_variable key, void* data, map_access_callback, bool cut) Nonnull__(1);
|
||||
extern int libcdsb_map_foreach(vtype_map* x, void* data, map_access_callback, rbforeach_t, bool flush) Nonnull__(1,3);
|
||||
|
||||
#endif /* LIBCDSB_MAP_H */
|
||||
|
||||
Reference in New Issue
Block a user