[Xcb] [PATCH lib] c_client.py: Do not create pointers in unions
Josh Triplett
josh at joshtriplett.org
Fri Dec 28 17:47:53 PST 2012
On Sat, Dec 29, 2012 at 01:32:09AM +0100, Daniel Martin wrote:
> On Fri, Dec 28, 2012 at 04:18:57PM -0800, Josh Triplett wrote:
> > On Fri, Dec 28, 2012 at 11:40:29PM +0100, Daniel Martin wrote:
> > > Do not create pointers in unions for fields of variadic length.
> > >
> > > Signed-off-by: Daniel Martin <consume.noise at gmail.com>
> > > ---
> > >
> > > With this patch xcb_xkb_doodad_t in xkb.h will change:
> > >
> > > typedef union xcb_xkb_doodad_t {
> > > xcb_xkb_common_doodad_t common; /**< */
> > > xcb_xkb_shape_doodad_t shape; /**< */
> > > - xcb_xkb_text_doodad_t *text; /**< */
> > > + xcb_xkb_text_doodad_t text; /**< */
> > > xcb_xkb_indicator_doodad_t indicator; /**< */
> > > - xcb_xkb_logo_doodad_t *logo; /**< */
> > > + xcb_xkb_logo_doodad_t logo; /**< */
> > > } xcb_xkb_doodad_t;
> >
> > Would this change any non-xkb structure in the existing ABI?
>
> No, that's the only diff that came up. Every other union has
> fixed-size-only fields.
And does this propagate the "variadic length" property to the union?
If so:
Reviewed-by: Josh Triplett <josh at joshtriplett.org>
More information about the Xcb
mailing list