From 3dee4eb8dcaa191964490dd9de792f0c6ba74b46 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 20 May 2020 02:26:56 +0100 Subject: [PATCH] Added SKIP_FIRST() macro for list iteration --- src/object.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/object.h b/src/object.h index 86bd048..dcb9737 100644 --- a/src/object.h +++ b/src/object.h @@ -11,13 +11,15 @@ _element = _element->forward) #define POINTER _element -#define FOR_POINTERS_IN_LISTS(_list1, _list2) \ - for(Object *_element = _list1->list, *_element2 = _list2->list; \ +#define FOR_POINTERS_IN_LISTS(_list, _list2) \ + for(Object *_element = _list->list, *_element2 = _list2->list; \ _element != NULL && _element2 != NULL; \ _element = _element->forward, _element2 = _element2->forward) #define P1 POINTER #define P2 _element2 +#define SKIP_FIRST() if(_element == _list->list) {continue;} + enum errorCode { MISMATCHED_PARENS, BAD_LIST_OF_SYMBOL_STRINGS,