break;
case DBUS_TYPE_INT16:
case DBUS_TYPE_UINT16:
+ /* Advance to the next suitably-aligned position >= *pos */
*pos = _DBUS_ALIGN_VALUE (*pos, 2);
*pos += 2;
break;
{
int len;
+ /* Let len be the number of bytes of string data, and advance
+ * *pos to just after the length */
len = _dbus_marshal_read_uint32 (str, *pos, byte_order, pos);
*pos += len + 1; /* length plus nul */
int i;
int alignment;
+ /* Advance to the next 4-byte-aligned position >= *pos */
i = _DBUS_ALIGN_VALUE (*pos, 4);
+ /* Let array_len be the number of bytes of array data, and advance
+ * i to just after the length */
array_len = _dbus_marshal_read_uint32 (str, i, byte_order, &i);
+ /* If the element type is more strictly-aligned than the length,
+ * advance i to the next suitably-aligned position
+ * (in other words, skip the padding) */
alignment = _dbus_type_get_alignment (element_type);
i = _DBUS_ALIGN_VALUE (i, alignment);
+ /* Skip the actual array data */
*pos = i + array_len;
}