[Xcb] Size of errors

Alexander Mezin mezin.alexander at gmail.com
Sun May 4 06:25:45 PDT 2014

Hi there.
I have few questions regarding xcb error handling, and can't find
answers in documentation.

Considering the following code:

xcb_generic_error_t *e = xcb_request_check(connection, cookie);
if (e)
    xcb_generic_error_t v = *e;

Is it safe?

Do all xcb_*_error_t structs have size <= sizeof(xcb_generic_error_t) ?
Does libxcb always allocate a buffer with size >= sizeof(xcb_generic_error_t) ?
May I rely on this behavior in future?

Also, do the same rules apply to checked calls with return value

More information about the Xcb mailing list