/* If this static assertion fails, it means the DBusMessageIter struct
* is not "packed", which might result in "iter = other_iter" not copying
* every byte. */
+#if DBUS_SIZEOF_VOID_P > 8
+ _DBUS_STATIC_ASSERT (sizeof (DBusMessageIter) == 16 * sizeof (void *));
+#else
_DBUS_STATIC_ASSERT (sizeof (DBusMessageIter) ==
4 * sizeof (void *) + sizeof (dbus_uint32_t) + 9 * sizeof (int));
+#endif
/* Since the iterator will read or write who-knows-what from the
* message, we need to get in the right byte order
* DBusMessageIter struct; contains no public fields.
*/
struct DBusMessageIter
-{
+{
+#if DBUS_SIZEOF_VOID_P > 8
+ void *dummy[16]; /**< Don't use this */
+#else
void *dummy1; /**< Don't use this */
void *dummy2; /**< Don't use this */
dbus_uint32_t dummy3; /**< Don't use this */
int pad1; /**< Don't use this */
void *pad2; /**< Don't use this */
void *pad3; /**< Don't use this */
+#endif
};
/**
* A message iterator for which dbus_message_iter_abandon_container_if_open()
* is the only valid operation.
*/
+#if DBUS_SIZEOF_VOID_P > 8
+#define DBUS_MESSAGE_ITER_INIT_CLOSED \
+{ \
+ { \
+ NULL, NULL, NULL, NULL, \
+ NULL, NULL, NULL, NULL, \
+ NULL, NULL, NULL, NULL, \
+ NULL, NULL, NULL, NULL \
+ } \
+}
+#else
#define DBUS_MESSAGE_ITER_INIT_CLOSED \
{ \
NULL, /* dummy1 */ \
NULL, /* pad2 */ \
NULL /* pad3 */ \
}
+#endif
DBUS_EXPORT
DBusMessage* dbus_message_new (int message_type);