diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-08-28 14:02:26 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-08-28 14:02:26 -0400 |
| commit | f8e456532ffaa9225894e77d5851c8d93a8fdad2 (patch) | |
| tree | 89a0494b8d99f79e78084dcd1a0d66072cbfe3eb /pkarr.h | |
| parent | 3e3d08f83f4e19d0f90d1c0356f78058e227f6fe (diff) | |
pkiter: promote to first-class feature
Diffstat (limited to 'pkarr.h')
| -rw-r--r-- | pkarr.h | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -3,6 +3,7 @@ #include <stdint.h> #include "pkmem.h" /* deleteme */ +#include "pkiter.h" /*deleteme*/ struct pk_arr { uint32_t next; @@ -25,13 +26,10 @@ void pk_arr_remove_at(struct pk_arr *arr, uint32_t index); void pk_arr_clone(struct pk_arr *lhs, struct pk_arr *rhs); void pk_arr_swap(struct pk_arr *lhs, struct pk_arr *rhs); uint32_t pk_arr_find_first_index(struct pk_arr *arr, void *user_data, pk_arr_item_compare *fn); -#ifdef PK_IMPL_ITER -#include "pkiter.h" /*deleteme*/ bool pk_arr_iter_begin(struct pk_arr *arr, struct pk_iter *it); bool pk_arr_iter_end(struct pk_arr *arr, struct pk_iter *it); bool pk_arr_iter_increment(struct pk_arr *arr, struct pk_iter *it); bool pk_arr_iter_decrement(struct pk_arr *arr, struct pk_iter *it); -#endif /* PK_IMPL_ITER */ #if defined(__cplusplus) template<typename T> @@ -301,8 +299,6 @@ pk_arr_find_first_index(struct pk_arr *arr, void *user_data, pk_arr_item_compare return -1; } -#ifdef PK_IMPL_ITER - bool pk_arr_iter_begin(struct pk_arr *arr, struct pk_iter *it) { it->data = nullptr; @@ -345,6 +341,4 @@ pk_arr_iter_decrement(struct pk_arr *arr, struct pk_iter *it) { return true; } -#endif /* PK_IMPL_ITER */ - #endif /* PK_IMPL_ARR */ |
