Add a wl_resource_instance_of function

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Jason Ekstrand 2013-06-20 20:36:47 -05:00 committed by Kristian Høgsberg
parent 96afa34776
commit 5ac5d55d81
4 changed files with 21 additions and 4 deletions

View file

@ -737,8 +737,8 @@ wl_connection_demarshal(struct wl_connection *connection,
return NULL;
}
static int
interface_equal(const struct wl_interface *a, const struct wl_interface *b)
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
@ -784,8 +784,8 @@ wl_closure_lookup_objects(struct wl_closure *closure, struct wl_map *objects)
}
if (object != NULL && message->types[i] != NULL &&
!interface_equal((object)->interface,
message->types[i])) {
!wl_interface_equal((object)->interface,
message->types[i])) {
printf("invalid object (%u), type (%s), "
"message %s(%s)\n",
id, (object)->interface->name,