From 88c3ad84bdd3bda3bb121019d8c55da21bf6fab8 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Fri, 30 Aug 2019 18:18:13 -0400 Subject: tuple assignment --- util/arr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util') diff --git a/util/arr.c b/util/arr.c index b3e0558..0d7ddfa 100644 --- a/util/arr.c +++ b/util/arr.c @@ -52,3 +52,4 @@ static void arr_free(Array *arr) { } #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