dynarray: Add PA_DYNARRAY_FOREACH

The PA_DYNARRAY_FOREACH macro requires that pa_dynarray_get() returns
NULL if the index is out of bounds.
This commit is contained in:
Tanu Kaskinen 2015-01-07 16:56:50 +02:00 committed by David Henningsson
parent 7d3879c07f
commit 360cb6550e
3 changed files with 8 additions and 4 deletions

View file

@ -78,8 +78,5 @@ const char *pa_tokenizer_get(pa_tokenizer *t, unsigned i) {
pa_assert(a);
if (i >= pa_dynarray_size(a))
return NULL;
return pa_dynarray_get(a, i);
}