diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-10-27 13:53:22 +1000 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:26 +0200 |
commit | 3155b9bb225656eb1d3871b65110210a342e8c70 (patch) | |
tree | 147a9039018dee7972f95433ad237c40edb8f1a3 | |
parent | 79cb50e4c4e88921b7f97da5431641cc842c19f7 (diff) | |
download | nx-libs-3155b9bb225656eb1d3871b65110210a342e8c70.tar.gz nx-libs-3155b9bb225656eb1d3871b65110210a342e8c70.tar.bz2 nx-libs-3155b9bb225656eb1d3871b65110210a342e8c70.zip |
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: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
-rw-r--r-- | nx-X11/lib/X11/Xlibint.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index 5adde76ed..8d7291d01 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -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 |