diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-28 14:29:51 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-28 14:29:51 +0100 |
commit | 61dbbe0eca5291b1329393a5fe1903fde415a243 (patch) | |
tree | ce30d6afd4ec0f20a8b0eed1dc7719eb985a8509 /src/libutil | |
parent | 85ea0ba9166ec92bf957fdca231e25568caba34a (diff) | |
download | rspamd-61dbbe0eca5291b1329393a5fe1903fde415a243.tar.gz rspamd-61dbbe0eca5291b1329393a5fe1903fde415a243.zip |
[Minor] Add macro for ptr array iteration
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h index d3ef5e082..1f2d2f852 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -500,4 +500,5 @@ gpointer rspamd_file_xmap (const char *fname, guint mode, gpointer rspamd_shmem_xmap (const char *fname, guint mode, gsize *size); +#define PTR_ARRAY_FOREACH(ar, i, cur) for ((i) = 0, (cur) = g_ptr_array_index((ar), 0); (i) < (ar)->len; (cur) = g_ptr_array_index((ar), (i)), ++(i)) #endif |