[PATCH weston v2 5/6] Add API to retrieve and iterate over the resources list of a client

Pekka Paalanen ppaalanen at gmail.com
Tue Aug 9 11:20:18 UTC 2016


On Tue, 9 Aug 2016 18:03:21 +0800
Jonas Ådahl <jadahl at gmail.com> wrote:

> On Tue, Aug 09, 2016 at 11:51:18AM +0200, Giulio Camuffo wrote:
> > 2016-08-09 10:17 GMT+02:00 Jonas Ådahl <jadahl at gmail.com>:  
> > > On Tue, Jul 05, 2016 at 09:51:10AM +0200, Giulio Camuffo wrote:  
> > >> To complement on the new resource created signal, this allows to
> > >> iterate over the existing resources of a client.
> > >>
> > >> Signed-off-by: Giulio Camuffo <giulio.camuffo at kdab.com>  

> > >> diff --git a/src/wayland-private.h b/src/wayland-private.h
> > >> index 045109b..b715534 100644
> > >> --- a/src/wayland-private.h
> > >> +++ b/src/wayland-private.h
> > >> @@ -74,7 +74,7 @@ struct wl_map {
> > >>       uint32_t free_list;
> > >>  };
> > >>
> > >> -typedef void (*wl_iterator_func_t)(void *element, void *data);
> > >> +typedef int (*wl_iterator_func_t)(void *element, void *data);  
> > >
> > > Not sure if this matters, but this changes the type signature of an
> > > exported function symbol: wl_map_for_each. While WL_EXPORT:ed, it's not
> > > exposed via any installed header file, so I suppose it won't cause any
> > > real problems.  
> > 
> > Oh, indeed... i wonder why it's exported. But i don't think we care,
> > our API is defined by the headers, right?  
> 
> I suspect it's from when things were moving between wayland and
> weston/wayland-demos. Could we maybe even unexport it? Would anything
> break?

The whole wl_map*() set of API in wayland-util.c is exported for no use
AFAIK. Maybe we should indeed try to unexport it all and see if anyone
notices.

Oh, except the tests... at least wl_map_for_each is not used by the
tests, but maybe that's rather an indication that there is a test
missing.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160809/3dc589ea/attachment.sig>


More information about the wayland-devel mailing list