Refactor array, add attaching functional
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
/* This software is licensed by the MIT License, see LICENSE file */
|
||||
/* Copyright © 2022 Gregory Lirent */
|
||||
|
||||
#include "../array.h"
|
||||
|
||||
#ifndef LIBCDSB_EXTRA_ARRAY_H
|
||||
#define LIBCDSB_EXTRA_ARRAY_H
|
||||
|
||||
#define array_get_by_index(s, index, data, callback) libcdsb_array_get(s, index, data, callback, 0)
|
||||
#define array_pop_by_index(s, index, data, callback) libcdsb_array_get(s, index, data, callback, 1)
|
||||
#define array_remove_by_index(s, index) libcdsb_array_get(s, index, 0, 0, 1)
|
||||
|
||||
#define array_foreach(x, data, callback) libcdsb_array_foreach(x, data, callback, 0)
|
||||
|
||||
extern ssize_t libcdsb_array_push (vtype_array* x, const void* value, vtype value_type) Nonnull__(1);
|
||||
extern size_t libcdsb_array_count (const vtype_array* s, const void* value, vtype type) Pure__ Warn_unused_result__ Nonnull__(1);
|
||||
extern int libcdsb_array_find (vtype_array* x, const void* value, vtype type, void* data, array_access_callback, bool reverse, bool cut) Nonnull__(1);
|
||||
extern int libcdsb_array_get (vtype_array* x, ssize_t index, void* data, array_access_callback, bool cut) Nonnull__(1);
|
||||
extern int libcdsb_array_foreach(vtype_array* x, void* data, array_access_callback, bool flush) Nonnull__(1,3);
|
||||
|
||||
#endif /* LIBCDSB_EXTRA_ARRAY_H */
|
||||
Reference in New Issue
Block a user