Skip to content

Commit

Permalink
array: add test code (#35)
Browse files Browse the repository at this point in the history
* array: add test code

---------

Signed-off-by: Takahiro Yamashita <[email protected]>
Signed-off-by: leonardo-albertovich <[email protected]>
Co-authored-by: leonardo-albertovich <[email protected]>
Co-authored-by: leonardo-albertovich <[email protected]>
  • Loading branch information
3 people authored Aug 5, 2024
1 parent 8a1b431 commit a1c6096
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/cfl/cfl_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ static inline struct cfl_variant *cfl_array_fetch_by_index(struct cfl_array *arr
return array->entries[position];
}

static inline size_t cfl_array_size(struct cfl_array *array)
{
return array->entry_count;
}

int cfl_array_append(struct cfl_array *array, struct cfl_variant *value);
int cfl_array_append_string(struct cfl_array *array, char *value);
int cfl_array_append_string_s(struct cfl_array *array, char *str, size_t str_len, int referenced);
Expand Down
1 change: 0 additions & 1 deletion tests/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

#include <cfl/cfl.h>

#include <float.h>
#include <math.h>

Expand Down

0 comments on commit a1c6096

Please sign in to comment.