Update array & list (extra) foreach symbols
This commit is contained in:
@@ -10,11 +10,13 @@
|
||||
#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 array_foreach(vtype_array* x, int (*callback)(void* value, ssize_t index, vtype type)) LIBCDSB_nt__ LIBCDSB_nn12__;
|
||||
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 */
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* This software is licensed by the MIT License, see LICENSE file */
|
||||
/* Copyright © 2022 Gregory Lirent */
|
||||
|
||||
#include <assert.h>
|
||||
#include "../list.h"
|
||||
|
||||
#ifndef LIBCDSB_EXTRA_LIST_H
|
||||
@@ -11,6 +10,8 @@
|
||||
#define list_pop_by_index(x, s, index) libcdsb_list_get(x, s, index, 1)
|
||||
#define list_remove_by_index(s, index) libcdsb_list_get(0, s, index, 1)
|
||||
|
||||
#define list_foreach libcdsb_list_foreach
|
||||
|
||||
extern ssize_t libcdsb_list_find (vtype_value* x, vtype_list* s, const void* value, vtype type, _Bool reverse, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn2__;
|
||||
extern _Bool libcdsb_list_update(vtype_list* x, ssize_t index, const void* value, vtype type, int ins_direction) LIBCDSB_nt__ LIBCDSB_nn1__;
|
||||
|
||||
@@ -18,6 +19,6 @@ extern size_t libcdsb_list_count(const vtype_list* s, const void* value, vtype
|
||||
|
||||
extern ssize_t libcdsb_list_get(vtype_value* x, vtype_list* s, ssize_t index, _Bool cut) LIBCDSB_nt__ LIBCDSB_nn2__;
|
||||
|
||||
extern int list_foreach(const vtype_list* x, int (*callback)(void* value, ssize_t index, vtype type)) LIBCDSB_nt__ LIBCDSB_nn12__;
|
||||
extern int libcdsb_list_foreach(const vtype_list* x, int (*callback)(void* value, ssize_t index, vtype type)) LIBCDSB_nt__ LIBCDSB_nn12__;
|
||||
|
||||
#endif /* LIBCDSB_EXTRA_LIST_H */
|
||||
|
||||
Reference in New Issue
Block a user