Files

22 lines
442 B
C
Raw Permalink Normal View History

2026-05-05 21:17:21 +01:00
#include <fx/collections/array.h>
#include <fx/int.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();
2026-05-05 21:17:21 +01:00
fx_array_append(array, fx_int_create(32));
fx_array_append(array, fx_int_create(64));
fx_array_append(array, fx_int_create(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;
}