From a1099999e02fb87e3f5f209dfbba3f93692953db Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sat, 21 Sep 2019 18:28:22 -0400 Subject: added float builtin and check for decl self-reference --- util/arr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util') diff --git a/util/arr.c b/util/arr.c index 0d7ddfa..63423c0 100644 --- a/util/arr.c +++ b/util/arr.c @@ -51,5 +51,6 @@ static void arr_free(Array *arr) { free(arr->data); } +/* NOTE: this will not work if type is a pointer! */ #define arr_foreach(arr, type, var) for (type *var = (arr)->data, *var##_foreach_last = arr_last(arr); var; var == var##_foreach_last ? var = NULL : var++) #define arr_foreach_reverse(arr, type, var) for (type *var = arr_last(arr); var; var == (arr)->data ? var = NULL : var--) -- cgit v1.2.3