[RFC wayland] Add server-side dispatchers support

Jason Ekstrand jason at jlekstrand.net
Tue Mar 26 06:24:43 PDT 2013


On Mar 26, 2013 3:28 AM, "Dave Airlie" <airlied at gmail.com> wrote:
>
> > +++ b/src/wayland-private.h
> > @@ -74,15 +74,9 @@ int wl_connection_write(struct wl_connection
*connection, const void *data, size
> >  int wl_connection_queue(struct wl_connection *connection,
> >                         const void *data, size_t count);
> >
> > -union wl_argument {
> > -       int32_t i;
> > -       uint32_t u;
> > -       wl_fixed_t f;
> > -       const char *s;
> > -       struct wl_object *o;
> > -       uint32_t n;
> > -       struct wl_array *a;
> > -       int32_t h;
> > +struct wl_dispatcher {
>
> Care to document why n is different from u and h from i?
>
> at first glance I can't see what they are for.

David,
Thanks for pointing this out as it should probably be documented.  Those
are the standard abbreviations for the 8 Wayland data types. Specifically,
"n" stands for new_id, "h" stands for file descriptor. While not strictly
needed, the redundancy serves to make things more explicit in the code.
When I actually send out the patches, I'll put comments in the union to
that effect.

Thanks for reviewing,
--Jason Ekstrand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130326/7833fb15/attachment.html>


More information about the wayland-devel mailing list