Commit 3155b9bb authored by Peter Hutterer's avatar Peter Hutterer Committed by Ulrich Sibiller

Use GetReqSized for GetReq and GetReqExtra

GetEmptyReq and GetResReq cannot do this due to the final typecast - typically requests that need either of those do not have their own typedef in the protocol headers. Signed-off-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net> Reviewed-by: 's avatarJamey Sharp <jamey@minilop.net> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 79cb50e4
......@@ -461,10 +461,10 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetReq(name, req) \
req = (x##name##Req *) _XGetRequest(dpy, X_##name, SIZEOF(x##name##Req))
GetReqSized(name, SIZEOF(x##name##Req), req)
#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define GetReq(name, req) \
req = (x/**/name/**/Req *) _XGetRequest(dpy, X_/**/name, SIZEOF(x/**/name/**/Req))
GetReqSized(name, SIZEOF(x/**/name/**/Req), req)
#endif
/* GetReqExtra is the same as GetReq, but allocates "n" additional
......@@ -472,10 +472,10 @@ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len);
#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetReqExtra(name, n, req) \
req = (x##name##Req *) _XGetRequest(dpy, X_##name, SIZEOF(x##name##Req) + n)
GetReqSized(name, SIZEOF(x##name##Req) + n, req)
#else
#define GetReqExtra(name, n, req) \
req = (x/**/name/**/Req *) _XGetRequest(dpy, X_/**/name, SIZEOF(x/**/name/**/Req) + n)
GetReqSized(name, SIZEOF(x/**/name/**/Req) + n, req)
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment