From a8e5f06fe01732fbd643bc435dd3b8eaa602defe Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 9 Nov 2011 16:58:33 +0100 Subject: libX11 mesa pixman git update 9 nov 2011 --- libX11/src/XlibInt.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'libX11/src') diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index 3db151e29..a8f5d0844 100644 --- a/libX11/src/XlibInt.c +++ b/libX11/src/XlibInt.c @@ -1956,6 +1956,37 @@ Screen *_XScreenOfWindow(Display *dpy, Window w) } +/* + * WARNING: This implementation's pre-conditions and post-conditions + * must remain compatible with the old macro-based implementations of + * GetReq, GetReqExtra, GetResReq, and GetEmptyReq. The portions of the + * Display structure affected by those macros are part of libX11's + * ABI. + */ +void *_XGetRequest(Display *dpy, CARD8 type, size_t len) +{ + xReq *req; + + WORD64ALIGN + + if (dpy->bufptr + len > dpy->bufmax) + _XFlush(dpy); + + if (len % 4) + fprintf(stderr, + "Xlib: request %d length %zd not a multiple of 4.\n", + type, len); + + dpy->last_req = dpy->bufptr; + + req = (xReq*)dpy->bufptr; + req->reqType = type; + req->length = len / 4; + dpy->bufptr += len; + dpy->request++; + return req; +} + #if defined(WIN32) /* -- cgit v1.2.3