mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
introduce FOREACH_ELEMENT
Add a FOREACH_ELEMENT() macro which just passes ELEMENTSOF(v) as third argument to FOREACH_ARRAY().
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
/* Mark a couple of iterator explicitly as iterators, otherwise Coccinelle gets a bit confused. Coccinelle
|
||||
* can usually infer this information automagically, but in these specific cases it needs a bit of help. */
|
||||
#define FOREACH_ARRAY(i, array, num) YACFE_ITERATOR
|
||||
#define FOREACH_ELEMENT(i, array) YACFE_ITERATOR
|
||||
#define FOREACH_DIRENT_ALL(de, d, on_error) YACFE_ITERATOR
|
||||
#define FOREACH_STRING(x, y, ...) YACFE_ITERATOR
|
||||
#define HASHMAP_FOREACH(e, h) YACFE_ITERATOR
|
||||
|
||||
Reference in New Issue
Block a user