While this question talks abnout XCB, I suppose it is more related to the protocol rather than usage of the XCB library, so I am forwarding this e-mail here.
 
-------- Beginning of forwarded message --------
03.02.2021, 23:47, "Junk Mail" <ireallyhates...@yandex.com>:
 
Of course I could simply read what is written here https://gitlab.freedesktop.org/xorg/lib/libxcb/-/blob/master/src/xcbext.h#L62 but still, I felt the need for examples showing its usage and I found this:
xcb_parts[2].iov_base = (char *) &xcb_out;
xcb_parts[2].iov_len = sizeof(xcb_out);

xcb_parts[3].iov_base = 0;
xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; // why?

xcb_parts[4].iov_base = (char *) value_list;
xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t);

xcb_parts[5].iov_base = 0;
xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; // why?
 
It seems like there are "delimiters" (index 3 and 5 of xcb_parts, which is of type struct iovec), and their lengths are always the negative value of the length of the previous index AND'd with 3, I have found nothing obvious that could shed light here: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/blob/master/src/xcb_out.c#L221
So if I read this code correctly, indexes 3 and 5 are sent directly to the X server, but I failed to find if this is something required by the X Window System protocol spec.
Could anyone shed light on this?
 
-------- End of forwarded message --------
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Reply via email to