From d06a875b042b608e61b2d5a2bb594641d3e1322f Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sun, 7 Feb 2021 19:21:42 +0100 Subject: Filter: Recursive filter iteration code Add macros for recursive filter iteration that allows to examine all instructions reachable from a filter. --- lib/buffer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/buffer.h b/lib/buffer.h index cd9bab86..fd40baa0 100644 --- a/lib/buffer.h +++ b/lib/buffer.h @@ -50,6 +50,8 @@ #define BUFFER_FLUSH(v) ({ (v).used = 0; }) +#define BUFFER_EMPTY(v) ({ (v).used == 0; }) + #define BUFFER_WALK(v,n) \ for (BUFFER_TYPE(v) *_n = (v).data, n; _n < ((v).data + (v).used) && (n = *_n, 1); _n++) -- cgit v1.2.3