[Xcb] question regarding <typedef>

Christoph Reimann chrr at arcor.de
Sun May 30 04:15:49 PDT 2010


Hi once more,
while looking through the generated C code, I stumbled upon the
translation of the typedef XML element.
Example:
  <typedef oldname="CARD32" newname="VISUALID" />

This gets translated to the following declarations in the header file:

typedef uint32_t xcb_visualid_t;

typedef struct xcb_visualid_iterator_t {
    xcb_visualid_t *data; /**<  */
    int             rem; /**<  */
    int             index; /**<  */
} xcb_visualid_iterator_t;

void
xcb_visualid_next (xcb_visualid_iterator_t *i  /**< */);

xcb_generic_iterator_t
xcb_visualid_end (xcb_visualid_iterator_t i  /**< */);

Why is the iterator code generated for a simple type? I grep'ed
through libxcb and util code, and it seems it doesn't even get called
somewhere. As far I understood it, iterator would make sense only for
list types??

Hope you have a nice Sunday,
Christoph


More information about the Xcb mailing list