25 #include "dbus-marshal-byteswap.h"
26 #include "dbus-marshal-basic.h"
27 #include "dbus-signature.h"
40 unsigned char **new_p)
55 p = _DBUS_ALIGN_ADDRESS (p, 2);
56 *((dbus_uint16_t*)p) = DBUS_UINT16_SWAP_LE_BE (*((dbus_uint16_t*)p));
65 p = _DBUS_ALIGN_ADDRESS (p, 4);
66 *((dbus_uint32_t*)p) = DBUS_UINT32_SWAP_LE_BE (*((dbus_uint32_t*)p));
75 p = _DBUS_ALIGN_ADDRESS (p, 8);
76 #ifdef DBUS_HAVE_INT64
77 *((dbus_uint64_t*)p) = DBUS_UINT64_SWAP_LE_BE (*((dbus_uint64_t*)p));
89 dbus_uint32_t array_len;
91 p = _DBUS_ALIGN_ADDRESS (p, 4);
95 *((dbus_uint32_t*)p) = DBUS_UINT32_SWAP_LE_BE (*((dbus_uint32_t*)p));
108 p = _DBUS_ALIGN_ADDRESS (p, alignment);
119 const unsigned char *array_end;
121 array_end = p + array_len;
125 while (p < array_end)
127 byteswap_body_helper (&sub,
140 p += (array_len + 1);
147 dbus_uint32_t sig_len;
160 dbus_uint32_t sig_len;
163 int contained_alignment;
174 p = _DBUS_ALIGN_ADDRESS (p, contained_alignment);
178 byteswap_body_helper (&sub,
FALSE, old_byte_order, new_byte_order, p, &p);
187 p = _DBUS_ALIGN_ADDRESS (p, 8);
191 byteswap_body_helper (&sub,
TRUE, old_byte_order, new_byte_order, p, &p);
205 if (walk_reader_to_end)
236 _dbus_assert (value_pos <= _dbus_string_get_length (value_str));
238 if (old_byte_order == new_byte_order)
242 signature, signature_start);
244 byteswap_body_helper (&reader,
TRUE,
245 old_byte_order, new_byte_order,