[PATCH] DBusMessage: specify dbus_message_iter_get_fixed_array() arg precisely
Rafał Miłecki
zajec5 at gmail.com
Wed Aug 7 13:11:39 UTC 2019
From: Rafał Miłecki <rafal at milecki.pl>
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 <rafal at milecki.pl>
---
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
More information about the dbus
mailing list