aboutsummaryrefslogtreecommitdiff
path: root/libxcb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-26 09:30:29 +0200
committermarha <marha@users.sourceforge.net>2014-06-26 09:30:29 +0200
commitc30d5eefc96925b4bef781806c7a0114eca1b8e0 (patch)
tree420bb99ba463e5df728e71214ea6aaed0ad18fcb /libxcb
parentd435b20322433b335a4fc5693cce0399a3f27b2d (diff)
downloadvcxsrv-c30d5eefc96925b4bef781806c7a0114eca1b8e0.tar.gz
vcxsrv-c30d5eefc96925b4bef781806c7a0114eca1b8e0.tar.bz2
vcxsrv-c30d5eefc96925b4bef781806c7a0114eca1b8e0.zip
Opdated to openssl-1.0.1h
xkeyboard-config fontconfig libX11 libxcb xcb-proto mesa xserver git update 26 June 2014 xserver commit a3b44ad8db1fa2f3b81c1ff9498f31c5323edd37 libxcb commit 125135452a554e89e49448e2c1ee6658324e1095 libxcb/xcb-proto commit 84bfd909bc3774a459b11614cfebeaa584a1eb38 xkeyboard-config commit 39a226707b133ab5540c2d30176cb3857e74dcca libX11 commit a4679baaa18142576d42d423afe816447f08336c fontconfig commit 274f2181f294af2eff3e8db106ec8d7bab2d3ff1 mesa commit 9a8acafa47558cafeb37f80f4b30061ac1962c69
Diffstat (limited to 'libxcb')
-rw-r--r--libxcb/src/c_client.py38
-rw-r--r--libxcb/src/xcb.h18
-rw-r--r--libxcb/src/xcb_in.c7
-rw-r--r--libxcb/xcb-proto/src/dri2.xml10
-rw-r--r--libxcb/xcb-proto/src/xv.xml1
5 files changed, 62 insertions, 12 deletions
diff --git a/libxcb/src/c_client.py b/libxcb/src/c_client.py
index c94a9e61c..b1d6d07a1 100644
--- a/libxcb/src/c_client.py
+++ b/libxcb/src/c_client.py
@@ -1548,6 +1548,17 @@ def _c_accessors_list(self, field):
Declares a direct-accessor function only if the list members are fixed size.
Declares length and get-iterator functions always.
'''
+
+ def get_align_pad(field):
+ prev = field.prev_varsized_field
+ prev_prev = field.prev_varsized_field.prev_varsized_field
+
+ if (prev.type.is_pad and prev.type.align > 0 and prev_prev is not None):
+ return (prev_prev, '((-prev.index) & (%d - 1))' % prev.type.align)
+ else:
+ return (prev, None)
+
+
list = field.type
c_type = self.c_type
@@ -1623,9 +1634,16 @@ def _c_accessors_list(self, field):
elif field.prev_varsized_field is None:
_c(' return (%s *) (R + 1);', field.c_field_type)
else:
- _c(' xcb_generic_iterator_t prev = %s;', _c_iterator_get_end(field.prev_varsized_field, 'R'))
- _c(' return (%s *) ((char *) prev.data + XCB_TYPE_PAD(%s, prev.index) + %d);',
- field.c_field_type, type_pad_type(field.first_field_after_varsized.type.c_type), field.prev_varsized_offset)
+ (prev_varsized_field, align_pad) = get_align_pad(field)
+
+ if align_pad is None:
+ align_pad = ('XCB_TYPE_PAD(%s, prev.index)' %
+ type_pad_type(field.first_field_after_varsized.type.c_type))
+
+ _c(' xcb_generic_iterator_t prev = %s;',
+ _c_iterator_get_end(prev_varsized_field, 'R'))
+ _c(' return (%s *) ((char *) prev.data + %s + %d);',
+ field.c_field_type, align_pad, field.prev_varsized_offset)
_c('}')
_hc('')
@@ -1727,9 +1745,17 @@ def _c_accessors_list(self, field):
elif field.prev_varsized_field == None:
_c(' i.data = (%s *) (R + 1);', field.c_field_type)
else:
- _c(' xcb_generic_iterator_t prev = %s;', _c_iterator_get_end(field.prev_varsized_field, 'R'))
- _c(' i.data = (%s *) ((char *) prev.data + XCB_TYPE_PAD(%s, prev.index));',
- field.c_field_type, type_pad_type(field.c_field_type))
+ (prev_varsized_field, align_pad) = get_align_pad(field)
+
+ if align_pad is None:
+ align_pad = ('XCB_TYPE_PAD(%s, prev.index)' %
+ type_pad_type(field.c_field_type))
+
+ _c(' xcb_generic_iterator_t prev = %s;',
+ _c_iterator_get_end(prev_varsized_field, 'R'))
+ _c(' i.data = (%s *) ((char *) prev.data + %s);',
+ field.c_field_type, align_pad)
+
if switch_obj is None:
_c(' i.rem = %s;', _c_accessor_get_expr(field.type.expr, fields))
_c(' i.index = (char *) i.data - (char *) %s;', 'R' if switch_obj is None else 'S' )
diff --git a/libxcb/src/xcb.h b/libxcb/src/xcb.h
index c17a2ef79..0bf59d00d 100644
--- a/libxcb/src/xcb.h
+++ b/libxcb/src/xcb.h
@@ -453,7 +453,8 @@ int xcb_get_file_descriptor(xcb_connection_t *c);
* Some errors that occur in the context of an xcb_connection_t
* are unrecoverable. When such an error occurs, the
* connection is shut down and further operations on the
- * xcb_connection_t have no effect.
+ * xcb_connection_t have no effect, but memory will not be freed until
+ * xcb_disconnect() is called on the xcb_connection_t.
*
* @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors.
* @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported.
@@ -475,6 +476,11 @@ int xcb_connection_has_error(xcb_connection_t *c);
* bidirectionally connected to an X server. If the connection
* should be unauthenticated, @p auth_info must be @c
* NULL.
+ *
+ * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
+ * Callers need to use xcb_connection_has_error() to check for failure.
+ * When finished, use xcb_disconnect() to close the connection and free
+ * the structure.
*/
xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info);
@@ -520,6 +526,11 @@ int xcb_parse_display(const char *name, char **host, int *display, int *screen);
* variable. If a particular screen on that server is preferred, the
* int pointed to by @p screenp (if not @c NULL) will be set to that
* screen; otherwise the screen will be set to 0.
+ *
+ * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
+ * Callers need to use xcb_connection_has_error() to check for failure.
+ * When finished, use xcb_disconnect() to close the connection and free
+ * the structure.
*/
xcb_connection_t *xcb_connect(const char *displayname, int *screenp);
@@ -534,6 +545,11 @@ xcb_connection_t *xcb_connect(const char *displayname, int *screenp);
* authorization @p auth. If a particular screen on that server is
* preferred, the int pointed to by @p screenp (if not @c NULL) will
* be set to that screen; otherwise @p screenp will be set to 0.
+ *
+ * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
+ * Callers need to use xcb_connection_has_error() to check for failure.
+ * When finished, use xcb_disconnect() to close the connection and free
+ * the structure.
*/
xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb_auth_info_t *auth, int *screen);
diff --git a/libxcb/src/xcb_in.c b/libxcb/src/xcb_in.c
index 14b67aec2..ad870c174 100644
--- a/libxcb/src/xcb_in.c
+++ b/libxcb/src/xcb_in.c
@@ -36,9 +36,6 @@
#include <stdio.h>
#include <errno.h>
-#include "xcb.h"
-#include "xcbext.h"
-#include "xcbint.h"
#if USE_POLL
#include <poll.h>
#endif
@@ -51,6 +48,10 @@
#include "xcb_windefs.h"
#endif /* _WIN32 */
+#include "xcb.h"
+#include "xcbext.h"
+#include "xcbint.h"
+
#define XCB_ERROR 0
#define XCB_REPLY 1
#define XCB_XGE_EVENT 35
diff --git a/libxcb/xcb-proto/src/dri2.xml b/libxcb/xcb-proto/src/dri2.xml
index 20d664912..3b4c12e9b 100644
--- a/libxcb/xcb-proto/src/dri2.xml
+++ b/libxcb/xcb-proto/src/dri2.xml
@@ -133,7 +133,10 @@ authorization from the authors.
<request name="GetBuffers" opcode="5">
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="count" />
- <list type="CARD32" name="attachments" />
+ <list type="CARD32" name="attachments">
+ <!-- The length field should be linked but we can't correct it without breaking API -->
+ <!-- <fieldref>count</fieldref> -->
+ </list>
<reply>
<pad bytes="1" />
<field type="CARD32" name="width" />
@@ -159,7 +162,10 @@ authorization from the authors.
<request name="GetBuffersWithFormat" opcode="7">
<field type="DRAWABLE" name="drawable" />
<field type="CARD32" name="count" />
- <list type="AttachFormat" name="attachments" />
+ <list type="AttachFormat" name="attachments">
+ <!-- The length field should be linked but we can't correct it without breaking API -->
+ <!-- <fieldref>count</fieldref> -->
+ </list>
<reply>
<pad bytes="1" />
<field type="CARD32" name="width" />
diff --git a/libxcb/xcb-proto/src/xv.xml b/libxcb/xcb-proto/src/xv.xml
index 0b55d3633..47a05d04d 100644
--- a/libxcb/xcb-proto/src/xv.xml
+++ b/libxcb/xcb-proto/src/xv.xml
@@ -101,6 +101,7 @@ authorization from the authors.
<list type="char" name="name">
<fieldref>name_size</fieldref>
</list>
+ <pad align="4" />
<list type="Format" name="formats">
<fieldref>num_formats</fieldref>
</list>