diff options
Diffstat (limited to 'src/stdlib/lists.c')
| -rw-r--r-- | src/stdlib/lists.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdlib/lists.c b/src/stdlib/lists.c index 9753cd86..3cc99b17 100644 --- a/src/stdlib/lists.c +++ b/src/stdlib/lists.c @@ -6,6 +6,7 @@ #include <stdint.h> #include <sys/param.h> +#include "../util.h" #include "integers.h" #include "lists.h" #include "math.h" @@ -227,7 +228,7 @@ void List$remove_item(List_t *list, void *item, Int_t max_removals, const TypeIn } public -OptionalInt_t List$find(List_t list, void *item, const TypeInfo_t *type) { +PUREFUNC OptionalInt_t List$find(List_t list, void *item, const TypeInfo_t *type) { const TypeInfo_t *item_type = type->ListInfo.item; for (int64_t i = 0; i < (int64_t)list.length; i++) { if (generic_equal(item, list.data + i * list.stride, item_type)) return I(i + 1); |
