X11/src/xcl io.c,1.7,1.8 xcblock.c,1.4,1.5 xcbwrap.m4,1.2,1.3
Jamey Sharp
xlibs-commit at pdx.freedesktop.org
Wed Sep 29 16:41:48 UTC 2004
Committed by: jamey
Update of /cvs/xlibs/X11/src/xcl
In directory gabe:/tmp/cvs-serv20565a/src/xcl
Modified Files:
io.c xcblock.c xcbwrap.m4
Log Message:
2004-09-29 Jamey Sharp <jamey at minilop.net>
* src/xcl/io.c:
Include the new xcbext.h header, and make use of new
sanity check macros.
* src/xcl/xcblock.c:
Make use of new sanity check macros, and don't make
Xlib's idea of the last request read exactly match
XCB's, since it shouldn't.
* src/xcl/xcbwrap.m4:
Fix handling of LISTPARAMs to match XCB's new
semantics.
Index: io.c
===================================================================
RCS file: /cvs/xlibs/X11/src/xcl/io.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- io.c 2 Aug 2004 15:00:07 -0000 1.7
+++ io.c 29 Sep 2004 16:41:46 -0000 1.8
@@ -1,8 +1,9 @@
-/* Copyright (C) 2003 Jamey Sharp.
+/* Copyright (C) 2003-2004 Jamey Sharp.
* This file is licensed under the MIT license. See the file COPYING. */
#include "Xlibint.h"
#include "xclint.h"
+#include <X11/XCB/xcbext.h>
#include <X11/XCB/xcbint.h>
#include <assert.h>
@@ -244,9 +245,10 @@
* account. */
if (newseq > xcb_seqnum)
newseq -= 0x10000;
- assert(newseq <= dpy->request);
+ _xcb_assert_sequence_less(newseq, dpy->request);
dpy->last_request_read = newseq;
+ _xcb_assert_sequence_less(dpy->last_request_read, xcb_seqnum);
return(newseq);
}
Index: xcblock.c
===================================================================
RCS file: /cvs/xlibs/X11/src/xcl/xcblock.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xcblock.c 3 Jul 2004 09:42:42 -0000 1.4
+++ xcblock.c 29 Sep 2004 16:41:46 -0000 1.5
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Jamey Sharp.
+/* Copyright (C) 2003-2004 Jamey Sharp.
* This file is licensed under the MIT license. See the file COPYING. */
#define _GNU_SOURCE /* for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP */
@@ -65,6 +65,9 @@
static const xReq dummy_request;
XCBConnection *c = XCBConnectionOfDisplay(dpy);
+
+ _xcb_assert_valid_sequence(c);
+
_xcb_out_force_sequence_wrap(c);
dpy->bufptr = dpy->buffer = c->out.queue + c->out.queue_len;
@@ -75,8 +78,10 @@
else
dpy->last_req = (char *) &dummy_request;
+ _xcb_assert_sequence_less(dpy->request, c->out.request);
dpy->request = c->out.request;
- dpy->last_request_read = c->in.request_read;
+
+ _xcb_assert_sequence_less(dpy->last_request_read, dpy->request);
}
void _XPutXCBBuffer(Display *dpy)
@@ -84,6 +89,8 @@
XCBConnection *c = XCBConnectionOfDisplay(dpy);
int len = dpy->bufptr - dpy->buffer;
+ _xcb_assert_sequence_less(dpy->last_request_read, dpy->request);
+
if(len)
{
struct iovec iov;
@@ -96,7 +103,9 @@
/* crash applications that use these without locking the display */
dpy->last_req = dpy->buffer = dpy->bufptr = dpy->bufmax = 0;
+ _xcb_assert_sequence_less(c->out.request, dpy->request);
c->out.request = dpy->request;
+ _xcb_assert_valid_sequence(c);
}
/* */
Index: xcbwrap.m4
===================================================================
RCS file: /cvs/xlibs/X11/src/xcl/xcbwrap.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- xcbwrap.m4 19 Jun 2004 09:18:06 -0000 1.2
+++ xcbwrap.m4 29 Sep 2004 16:41:46 -0000 1.3
@@ -121,11 +121,12 @@
PARAM($1, $2)
')
-define(`LISTPARAM', `PUSHDIV(0), dnl
+define(`LISTPARAM', `ifelse(`$3', , `PARAM(CARD32, $2_len)')
+PUSHDIV(0), dnl
($1 *) $2`'dnl
POPDIV()')
define(`VALUEPARAM', `
PARAM($1, $2)
-LISTPARAM(CARD32, $3)
+LISTPARAM(CARD32, $3, dummy-len)
')
More information about the xlibs-commit
mailing list