Files
bluelib/test/ds/arrays.c

22 lines
417 B
C
Raw Normal View History

#include <blue/ds/array.h>
#include <blue/ds/number.h>
2024-10-24 21:33:19 +01:00
#include <stdio.h>
int main(void)
{
b_array *array = b_array_create();
b_array_append(array, B_RV_INT(32));
b_array_append(array, B_RV_INT(64));
b_array_append(array, B_RV_INT(128));
2025-11-01 10:04:41 +00:00
b_iterator *it = b_iterator_begin(array);
b_foreach_ptr(b_object, obj, it)
2024-10-24 21:33:19 +01:00
{
2025-11-01 10:04:41 +00:00
printf("object %p\n", obj);
2024-10-24 21:33:19 +01:00
}
2025-11-01 10:04:41 +00:00
b_iterator_unref(it);
2024-10-24 21:33:19 +01:00
b_array_unref(array);
2024-10-24 21:33:19 +01:00
return 0;
}