Only use the low-order 7 bits of the type code in determining event types.

Original commit from freedesktop repo:

9206f73599512f2243c19ab21856863b246d867b
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Wed Feb 29 11:59:51 2012 -0500

    Only use the low-order 7 bits of the type code in determining event types.

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

1 file changed, 1 insertion(+), 1 deletion(-)
 src/event.c |    2 +-
Don't blindly access the connection object in xpybCookie_dealloc; it may be NULL.

Original commit from freedesktop repo:

20c697b2741d63e61e8cbf8c6bb89332b24bb218
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Wed Feb 29 11:59:53 2012 -0500

    Don't blindly access the connection object in xpybCookie_dealloc; it may be NULL.

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

1 file changed, 1 insertion(+), 1 deletion(-)
 src/cookie.c |    2 +-
Remove unused data field from xpybProtobj

Original commit from freedesktop repo:

719555e141f3b9c2f420ecc9bec88471ea5a410e
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Wed Feb 29 11:59:55 2012 -0500

    Removed unused data field from xpybProtobj.

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

2 files changed, 2 deletions(-)
 src/protobj.c |    1 -
 src/protobj.h |    1 -
Ensure that there's still a valid connection to the X server before attempting to send a request.

Original commit from freedesktop repo:

7ce51a20d9c95c982163ae340a4dff99dc5f05a6
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Wed Feb 29 11:59:52 2012 -0500

    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>

1 file changed, 4 insertions(+)
 src/ext.c |    4 ++++
Don't leak reply data.

Original commit from freedesktop repo:

3ef6cfd18e57bd7b815c02bd9a52b3baf7a4858f
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Wed Feb 29 11:59:56 2012 -0500

    Don't leak reply data.

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

1 file changed, 10 insertions(+), 1 deletion(-)
 src/cookie.c |   11 ++++++++++-
Remember to decrement refcount of constructed List elements.

Original commit from freedesktop repo:

3e9c570c5be43b73882539425b823c12aeba2808
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Sat Mar 17 01:32:42 2012 -0400

    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>

1 file changed, 1 insertion(+)
 src/list.c |    1 +
Fix building with latest xcbgen

Original commit from freedesktop repo:

c5ff7fbf5a53cc20984a20d5461be2fc1f1eac39
Author: Julien Danjou <julien@danjou.info>
Date:   Thu Mar 22 21:27:02 2012 +0100

    Fix building with latest xcbgen

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

1 file changed, 5 insertions(+), 1 deletion(-)
 src/py_client.py |    6 +++++-
Avoid reference cycles in response instance.

Original commit from freedesktop repo:

057b54d4bcd5b383343e00a3685e6b1ef343c2d2
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Wed Feb 29 11:59:57 2012 -0500

    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>

1 file changed, 35 insertions(+), 32 deletions(-)
 src/py_client.py |   67 ++++++++++++++++++++++++++++--------------------------
Fix length field handling, again

Original commit from freedesktop repo:

3dd06e863bb3bd6abc38e630c55d30f2e642439b
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Fri Mar 23 10:19:09 2012 -0400

    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>

1 file changed, 6 insertions(+), 10 deletions(-)
 src/py_client.py |   16 ++++++----------
Pack requests using standard size and no alignment.

Original commit from freedesktop repo:

64032e0579fea517c22723a914441344da4feea2
Author: Alex Plotnick <shrike@netaxs.com>
Date:   Fri Mar 23 10:40:14 2012 -0400

    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>

1 file changed, 5 insertions(+), 5 deletions(-)
 src/py_client.py |   10 +++++-----
xpybConn_call should ensure ext is not NULL before using it

Original commit from freedesktop repo:

ed0147e182cc739ae77c34675080e14d498492b2 HEAD origin/master master
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Aug 18 16:44:31 2013 -0700

    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>

1 file changed, 1 insertion(+), 1 deletion(-)
 src/conn.c |    2 +-
in setup.py try to use pkg-config to find xcb-proto
Merge branch 'f/freedesktop-xpyb-fixes'
Merge branch 'f/setup-pkg-config'