util: Pass flags to map iterators

On the client side we're going to need to know if an object from the
map is a zombie before we attempt to dereference it, so we need to
pass this to the iterator.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Derek Foreman 2017-12-06 11:22:21 -06:00 committed by Daniel Stone
parent 46e4ea43a2
commit b4cf9e7d5e
3 changed files with 8 additions and 8 deletions

View file

@ -371,7 +371,7 @@ for_each_helper(struct wl_array *entries, wl_iterator_func_t func, void *data)
for (p = start; p < end; p++)
if (p->data && !map_entry_is_free(*p)) {
ret = func(map_entry_get_data(*p), data);
ret = func(map_entry_get_data(*p), data, map_entry_get_flags(*p));
if (ret != WL_ITERATOR_CONTINUE)
break;
}