[Xcb] reason for xcb_parts being 2 elements larger?

Thomas Hunger hto at arcor.de
Mon Sep 3 13:46:39 PDT 2007


I wonder what the reason is to use e.g.

    struct iovec xcb_parts[6];

then start filling with position 2:

    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;

and then only submit the parts starting from 2:

xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);


It seems to me that I could create a proper sized array and submit 
just that without adding two?


More information about the Xcb mailing list