[Xcb] One more thing (Re: Invalid XIDs)

Barton C Massey bart at cs.pdx.edu
Sat Jan 24 17:55:48 PST 2009


In message <200901250142.n0P1g4Ro003805 at adara.cs.pdx.edu> I wrote:
> Why don't you try this code instead?  I changed the
> invariant so that outside of the function xid.last really is
> the xid allocated on the last call and xid.max really is the
> maximum xid to be allocated in this block.  I also changed
> the block allocation test and added a couple of assertions
> so that if this code fails it will fail early.

Note that this will still drop xid "0" on the ground,
because of the way _xcb_xid_init() works.  We could fix the
initialization there to be

  c->xid.last = - c->xid.inc;

I'm not sure if that's better or worse, though. :-)

    Bart


More information about the Xcb mailing list