diff options
author | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2009-04-19 15:13:27 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@daimi.au.dk> | 2009-04-19 15:13:27 -0400 |
commit | 4d788ecc8f573108842d70b2fe8f17dda938c08e (patch) | |
tree | 6342accbb876310bcf92bdaf79039d8249f75fd3 | |
parent | c5903dd2f53f3ed87091a499009bb2c284a7db7f (diff) |
Use correct type for the member array
-rw-r--r-- | dbus.c | 32 |
1 files changed, 14 insertions, 18 deletions
@@ -44,7 +44,7 @@ struct nul_dbus_object_t struct nul_dbus_interface_t { char *name; - nul_ptr_t *members; + nul_dbus_member_t **members; }; struct nul_dbus_member_t @@ -367,14 +367,14 @@ introspect (nul_dbus_object_t *object) for (itf = object->interfaces; *itf; ++itf) { nul_dbus_interface_t *interface = *itf; - nul_ptr_t *q; + nul_dbus_member_t **mem; xml = nul_string_append_printf ( xml, " <interface name=\"%s\">\n", interface->name); - for (q = interface->members; *q; ++q) + for (mem = interface->members; *mem; ++mem) { - nul_dbus_member_t *member = *q; + nul_dbus_member_t *member = *mem; int i; xml = nul_string_append_printf ( @@ -661,11 +661,11 @@ message_function (DBusConnection *connection, if (strcmp (msg_interface, interface->name) == 0) { - nul_ptr_t *q; + nul_dbus_member_t **mem; - for (q = interface->members; *q; ++q) + for (mem = interface->members; *mem; ++mem) { - nul_dbus_member_t *member = *q; + nul_dbus_member_t *member = *mem; if (strcmp (member->name, msg_member) == 0) return invoke (connection, object, member, message); @@ -963,20 +963,16 @@ nul_dbus_interface (const char *name, { nul_dbus_interface_t *interface = g_new0 (nul_dbus_interface_t, 1); va_list parameters; - nul_ptr_t *p; + nul_dbus_member_t **mem; interface->name = g_strdup (name); va_start (parameters, member1); - interface->members = make_ptr_array (member1, parameters); + interface->members = (nul_dbus_member_t **)make_ptr_array (member1, parameters); va_end (parameters); - for (p = interface->members; *p; ++p) - { - nul_dbus_member_t *member = *p; - - member->interface = interface; - } + for (mem = interface->members; *mem; ++mem) + (* mem)->interface = interface; return interface; } @@ -1279,11 +1275,11 @@ find_interface (nul_dbus_object_t *object, const char *name) static nul_dbus_member_t * find_member (nul_dbus_interface_t *interface, const char *name) { - nul_ptr_t *p; + nul_dbus_member_t **mem; - for (p = interface->members; *p; ++p) + for (mem = interface->members; *mem; ++mem) { - nul_dbus_member_t *member = *p; + nul_dbus_member_t *member = *mem; if (strcmp (member->name, name) == 0) return member; |