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 *((dbus_uint64_t*)p) = DBUS_UINT64_SWAP_LE_BE (*((dbus_uint64_t*)p));
85 dbus_uint32_t array_len;
87 p = _DBUS_ALIGN_ADDRESS (p, 4);
91 *((dbus_uint32_t*)p) = DBUS_UINT32_SWAP_LE_BE (*((dbus_uint32_t*)p));
104 p = _DBUS_ALIGN_ADDRESS (p, alignment);
115 const unsigned char *array_end;
117 array_end = p + array_len;
121 while (p < array_end)
123 byteswap_body_helper (&sub,
136 p += (array_len + 1);
143 dbus_uint32_t sig_len;
156 dbus_uint32_t sig_len;
159 int contained_alignment;
170 p = _DBUS_ALIGN_ADDRESS (p, contained_alignment);
174 byteswap_body_helper (&sub,
FALSE, old_byte_order, new_byte_order, p, &p);
183 p = _DBUS_ALIGN_ADDRESS (p, 8);
187 byteswap_body_helper (&sub,
TRUE, old_byte_order, new_byte_order, p, &p);
201 if (walk_reader_to_end)
232 _dbus_assert (value_pos <= _dbus_string_get_length (value_str));
234 if (old_byte_order == new_byte_order)
238 signature, signature_start);
240 byteswap_body_helper (&reader,
TRUE,
241 old_byte_order, new_byte_order,