mirror of
https://sourceware.org/git/glibc.git
synced 2025-11-27 12:01:15 +03:00
Add simple-to-use iterator macros for arrays. They are used instead
of explicit for statements, like:
/* Test all common speeds */
array_foreach_const (ts, test_speeds)
test (fd, *ts);
In this case, ts will be a const pointer to each of the elements of
test_speeds in turn.
Named array_foreach*() to allow for other kinds of equivalent iterator
macros in the future.
Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2.2 KiB
2.2 KiB