Files
fx/test/ds/arrays.c

22 lines
427 B
C
Raw Normal View History

2026-03-16 10:35:43 +00:00
#include <fx/ds/array.h>
#include <fx/ds/number.h>
2024-10-24 21:33:19 +01:00
#include <stdio.h>
int main(void)
{
2026-03-16 10:35:43 +00:00
fx_array *array = fx_array_create();
fx_array_append(array, FX_RV_INT(32));
fx_array_append(array, FX_RV_INT(64));
fx_array_append(array, FX_RV_INT(128));
2024-10-24 21:33:19 +01:00
2026-03-16 10:35:43 +00:00
fx_iterator *it = fx_iterator_begin(array);
fx_foreach_ptr(fx_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
}
2026-03-16 10:35:43 +00:00
fx_iterator_unref(it);
2024-10-24 21:33:19 +01:00
2026-03-16 10:35:43 +00:00
fx_array_unref(array);
2024-10-24 21:33:19 +01:00
return 0;
}