23 lines
999 B
C
23 lines
999 B
C
/* 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(x, s, index) libcdsb_array_get(x, s, index, 0)
|
|
#define array_pop(x, s, index) libcdsb_array_get(x, s, index, 1)
|
|
#define array_remove(s, index) libcdsb_array_get(0, s, index, 1)
|
|
|
|
#define array_foreach libcdsb_array_foreach
|
|
|
|
extern ssize_t libcdsb_array_get(vtype_value* x, vtype_array* s, ssize_t index, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn2__;
|
|
|
|
extern ssize_t libcdsb_array_find(const vtype_array* x, const void* value, vtype value_type) LIBCDSB_nt__ LIBCDSB_nn1__;
|
|
extern ssize_t libcdsb_array_push( vtype_array* x, const void* value, vtype value_type) LIBCDSB_nt__ LIBCDSB_nn1__;
|
|
|
|
extern int libcdsb_array_foreach(vtype_array* x, int (*callback)(void* value, ssize_t index, vtype type)) LIBCDSB_nt__ LIBCDSB_nn12__;
|
|
|
|
#endif /* LIBCDSB_EXTRA_ARRAY_H */
|