Update set (vtype_variable)

This commit is contained in:
2023-03-23 16:21:52 +03:00
parent 7657e72c4f
commit a3107ef73b
3 changed files with 24 additions and 24 deletions
+9 -9
View File
@@ -8,7 +8,7 @@
#ifndef LIBCDSB_SET_H
#define LIBCDSB_SET_H
typedef int (*vset_access_callback)(const void* value, vtype type, void* data);
typedef int (*vset_access_callback)(vtype_variable value, void* data);
/*#####################################################################################################################*/
@@ -16,10 +16,10 @@ extern void vset_init(vtype_set* x, vtype type) Nonnull__(1);
/*#####################################################################################################################*/
#define vset_pop(x, value, data, callback) libcdsb_vset_find (x, _LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value), data, callback, 1)
#define vset_get(x, value, data, callback) libcdsb_vset_find (x, _LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value), data, callback, 0)
#define vset_push(x, value) libcdsb_vset_insert (x, _LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value))
#define vset_attach(x, value) libcdsb_vset_attach (x, _LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value))
#define vset_pop(x, value, data, callback) libcdsb_vset_find (x, libcdsb_variable_build(_LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value)), data, callback, 1)
#define vset_get(x, value, data, callback) libcdsb_vset_find (x, libcdsb_variable_build(_LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value)), data, callback, 0)
#define vset_push(x, value) libcdsb_vset_insert (x, libcdsb_variable_build(_LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value)))
#define vset_attach(x, value) libcdsb_vset_attach (x, libcdsb_variable_build(_LIBCDSB_value_pointer(value), _LIBCDSB_vtypeof(value)))
#define vset_foreach(x, data, callback) libcdsb_vset_foreach(x, data, callback, RBFOREACH_UNSPECIFIED, 0)
#define vset_remove(x, value) vset_pop (x, value, 0, 0)
@@ -27,9 +27,9 @@ extern void vset_init(vtype_set* x, vtype type) Nonnull__(1);
/*#####################################################################################################################*/
extern bool libcdsb_vset_insert (vtype_set* x, const void* value, vtype type) Nonnull__(1);
extern bool libcdsb_vset_attach (vtype_set* x, const void* value, vtype type) Nonnull__(1);
extern int libcdsb_vset_find (vtype_set* x, const void* value, vtype type, void* data, vset_access_callback, bool cut) Nonnull__(1);
extern int libcdsb_vset_foreach(vtype_set* x, void* data, vset_access_callback, rbforeach_t, bool flush) Nonnull__(1,3);
extern bool libcdsb_vset_insert (vtype_set* x, vtype_variable) Nonnull__(1);
extern bool libcdsb_vset_attach (vtype_set* x, vtype_variable) Nonnull__(1);
extern int libcdsb_vset_find (vtype_set* x, vtype_variable, void* data, vset_access_callback, bool cut) Nonnull__(1);
extern int libcdsb_vset_foreach(vtype_set* x, void* data, vset_access_callback, rbforeach_t, bool flush) Nonnull__(1,3);
#endif /* LIBCDSB_SET_H */