mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
connection: Move wl_interface_equal to util
Move the wl_interface_equal prototype to the top of wayland-private, where it is not buried in the middle of map, connection and closure functions. Move the implementation out of connection and into util. This is a utility function, not specific to connections, and has call sites within connection, wayland-client and wayland-server. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
e5b12aa827
commit
385906beae
3 changed files with 17 additions and 17 deletions
|
|
@ -797,19 +797,6 @@ wl_connection_demarshal(struct wl_connection *connection,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
wl_interface_equal(const struct wl_interface *a, const struct wl_interface *b)
|
||||
{
|
||||
/* In most cases the pointer equality test is sufficient.
|
||||
* However, in some cases, depending on how things are split
|
||||
* across shared objects, we can end up with multiple
|
||||
* instances of the interface metadata constants. So if the
|
||||
* pointers match, the interfaces are equal, if they don't
|
||||
* match we have to compare the interface names. */
|
||||
|
||||
return a == b || strcmp(a->name, b->name) == 0;
|
||||
}
|
||||
|
||||
int
|
||||
wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue