diff options
author | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2009-04-19 15:05:44 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2009-04-19 15:05:44 -0400 |
commit | a732af4e1f0e12032cf8ada034409d5e56cd53ef (patch) | |
tree | 87d7ecb95069cb36690577ce911a39cef86ca2a6 | |
parent | ca68ce365a12a06f633ad0261d00dc1fbc8fd93e (diff) |
Use correct type for the interface array
-rw-r--r-- | dbus.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -38,7 +38,7 @@ struct nul_dbus_object_t { char *name; nul_ptr_t data; - nul_ptr_t *interfaces; + nul_dbus_interface_t **interfaces; }; struct nul_dbus_interface_t @@ -360,13 +360,13 @@ static const char * introspect (nul_dbus_object_t *object) { nul_string_t *xml = nul_string_new (); - nul_ptr_t *p; + nul_dbus_interface_t **itf; xml = nul_string_append_printf (xml, "<node>\n"); - for (p = object->interfaces; *p; ++p) + for (itf = object->interfaces; *itf; ++itf) { - nul_dbus_interface_t *interface = *p; + nul_dbus_interface_t *interface = *itf; nul_ptr_t *q; xml = nul_string_append_printf ( @@ -634,7 +634,7 @@ message_function (DBusConnection *connection, const char *msg_interface = dbus_message_get_interface (message); const char *msg_member = dbus_message_get_member (message); nul_dbus_object_t *object = data; - nul_ptr_t *p; + nul_dbus_interface_t **itf; g_assert (strcmp (object->name, msg_path) == 0); @@ -655,9 +655,9 @@ message_function (DBusConnection *connection, } /* Normal method */ - for (p = object->interfaces; *p; ++p) + for (itf = object->interfaces; *itf; ++itf) { - nul_dbus_interface_t *interface = *p; + nul_dbus_interface_t *interface = *itf; if (strcmp (msg_interface, interface->name) == 0) { @@ -932,7 +932,7 @@ nul_dbus_object (const char *name, object->data = data; va_start (args, interface1); - object->interfaces = make_ptr_array (interface1, args); + object->interfaces = (nul_dbus_interface_t **)make_ptr_array (interface1, args); va_end (args); /* Add introspection interface */ @@ -942,7 +942,7 @@ nul_dbus_object (const char *name, * interface as any other interface */ object->interfaces = nul_array_append ( - object->interfaces, (void *)nul_dbus_interface ( + object->interfaces, nul_dbus_interface ( "org.freedesktop.DBus.Introspectable", nul_dbus_method ( "Introspect", @@ -1263,11 +1263,11 @@ find_object (nul_dbus_service_t *service, const char *name) static nul_dbus_interface_t * find_interface (nul_dbus_object_t *object, const char *name) { - nul_ptr_t *p; + nul_dbus_interface_t **itf; - for (p = object->interfaces; *p; ++p) + for (itf = object->interfaces; *itf; ++itf) { - nul_dbus_interface_t *interface = *p; + nul_dbus_interface_t *interface = *itf; if (strcmp (interface->name, name) == 0) return interface; |