summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/pso/macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/pso/macros.h b/include/pso/macros.h
index c449b6f..f7498c3 100644
--- a/include/pso/macros.h
+++ b/include/pso/macros.h
@@ -2,5 +2,7 @@
#define MACROS_H
#define OBJECT_NAME(name) static const char *name##_name = #name;
+#define FOREACH_NODE(type, first, varname) for (type *varname = (type *)(first); varname != NULL; varname = (type *)(varname->next))
+#define FOREACH_NODE_NODECL(type, first, varname) for (varname = (type *)(first); varname != NULL; varname = (type *)(varname->next))
#endif