[PATCH] DBusMessage: specify dbus_message_iter_get_fixed_array() arg precisely

Rafał Miłecki <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
From: Rafał Miłecki <[email protected]>

That function takes pointer to an array as the second argument. Specify
its type precisely to help users avoid mistakes in calls.

This also matches _dbus_type_reader_read_fixed_multi() which is used
internally and has "const void **value" argument specified.

Signed-off-by: Rafał Miłecki <[email protected]>
---
 dbus/dbus-message.c | 2 +-
 dbus/dbus-message.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index edf76549..2edc47dc 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -2473,7 +2473,7 @@ dbus_message_iter_get_array_len (DBusMessageIter *iter)
  */
 void
 dbus_message_iter_get_fixed_array (DBusMessageIter  *iter,
-                                   void             *value,
+                                   void             **value,
                                    int              *n_elements)
 {
   DBusMessageRealIter *real = (DBusMessageRealIter *)iter;
diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h
index da2f2d9d..0d1aa268 100644
--- a/dbus/dbus-message.h
+++ b/dbus/dbus-message.h
@@ -278,7 +278,7 @@ DBUS_DEPRECATED int         dbus_message_iter_get_array_len    (DBusMessageIter
 #endif
 DBUS_EXPORT
 void        dbus_message_iter_get_fixed_array  (DBusMessageIter *iter,
-                                                void            *value,
+                                                void            **value,
                                                 int             *n_elements);
 
 
-- 
2.21.0

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.