[PATCH wayland 0/1] connection: Move wl_interface_equal to util

Pekka Paalanen ppaalanen at gmail.com
Mon May 9 12:45:58 UTC 2016


On Sun,  8 May 2016 08:44:07 -0500
Yong Bakos <junk at humanoriented.com> wrote:

> From: Yong Bakos <ybakos at humanoriented.com>
> 
> First, please forgive me if I'm making naive changes. I do look at the
> history of things before submitting such patches (I'm no maverick), and I
> appreciate the time it takes to tell me "no".
> 
> During my documentation journey I found wl_interface_equal buried in the
> middle of map, connection and closure related function prototypes in
> wayland-private. In addition, the implementation is in connection.c, and
> while there is a call site there, wayland-client and wayland-server also
> call wl_interface_equal. It's indeed a utility function and not
> connection-specific; connection, wayland-client and wayland-server include
> wayland-util anyway; so, this patch argues for moving the implementation to
> wayland-util.
> 
> Should this function be private at all? I understand the value of keeping
> the API as minimal as possible, but I recall some recent patches doing a
> lot of interface->name comparisons.

Hi,

no harm in the patch.

I think it should be private, I do not recall any other place that
would be comparing a wl_interface to another wl_interface.

I guess the comparisons you saw may have been in wl_registry.global
handlers. The global handler gets the interface name as a string and
tries to match it to known wl_interface.names. It's not wl_interface
vs. wl_interface comparison.


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/20160509/e660c9aa/attachment.sig>


More information about the wayland-devel mailing list