Add m4 directory to fix autogen.
Only use the low-order 7 bits of the type code in determining event types.

Signed-off-by: Julien Danjou <julien@danjou.info>
Don't blindly access the connection object in xpybCookie_dealloc; it may be NULL.

Signed-off-by: Julien Danjou <julien@danjou.info>
Removed prototype for obsolete xpybReply_populate routine.

Signed-off-by: Julien Danjou <julien@danjou.info>
Removed unused data field from xpybProtobj.

Signed-off-by: Julien Danjou <julien@danjou.info>
Ensure that there's still a valid connection to the X server before attempting to send a request.

Signed-off-by: Julien Danjou <julien@danjou.info>
Don't leak reply data.

Signed-off-by: Julien Danjou <julien@danjou.info>
Remember to decrement refcount of constructed List elements.

After we append a constructed object to self->list, we no longer
need a reference to it. Failing to decrement its refcount results
in a memory leak.

Signed-off-by: Julien Danjou <julien@danjou.info>
Disable DRI2 building

It does not build for now, but it should not disable building the rest of xpyb.

Signed-off-by: Julien Danjou <julien@danjou.info>
Fix building with latest xcbgen

Signed-off-by: Julien Danjou <julien@danjou.info>
Avoid reference cycles in response instances.

The issue is with fields that use self as the parent buffer; we end
up with cycles that the GC can't collect, since buffer objects aren't
GC-aware.

Also took the opportunity to replace separate "count" variables with
offsets wherever possible, and skip size calculations entirely for
fixed-size Unions.

Signed-off-by: Julien Danjou <julien@danjou.info>
Release xpyb 1.3

Signed-off-by: Julien Danjou <julien@danjou.info>
Fix length field handling, again.

This revises commit c5ff7fbf5a53cc20984a20d5461be2fc1f1eac39, which did
fix the build, but generated invalid code for (at least) QueryTextExtents.

Signed-off-by: Julien Danjou <julien@danjou.info>
Depends on xcb-proto 1.7.1

Signed-off-by: Julien Danjou <julien@danjou.info>
Pack requests using standard size and no alignment.

By default, Python's struct module automatically adds alignment padding
between successive structure members. We need precise control over the
layout of requests, so it's important that we not let it do that.

Signed-off-by: Julien Danjou <julien@danjou.info>
Release xpyb 1.3.1

Signed-off-by: Julien Danjou <julien@danjou.info>
xpybConn_call should ensure ext is not NULL before using it

Found by Oracle's Parfait 1.2 static analyzer:
   Null pointer dereference (CWE 476): Read from null pointer ext
        at line 322 of /export/alanc/X.Org/amd64-parfait/xcb/xpyb/src/conn.c
            in function 'xpybConn_call'.
          Function xpybConn_load_ext may return constant 'NULL' at line 141,
              called at line 321.
          Null pointer introduced at line 141 in function 'xpybConn_load_ext'.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>