glx: replace __GLX_SWAP_INT() by swapl()

We have an optimized function for this, so use it.
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-09-02 16:08:11 +02:00
committed by Enrico Weigelt
parent d438dfc677
commit c339338277
8 changed files with 199 additions and 311 deletions

View File

@@ -122,14 +122,6 @@
GLbyte *swapPC; \
GLbyte *swapEnd
#define __GLX_SWAP_INT(pc) \
sw = ((GLbyte *)(pc))[0]; \
((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
((GLbyte *)(pc))[3] = sw; \
sw = ((GLbyte *)(pc))[1]; \
((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
((GLbyte *)(pc))[2] = sw;
#define __GLX_SWAP_DOUBLE(pc) \
sw = ((GLbyte *)(pc))[0]; \
((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
@@ -170,12 +162,12 @@
#define __GLX_SWAP_REPLY_HEADER() \
swaps(&reply.sequenceNumber); \
__GLX_SWAP_INT(&reply.length);
swapl(&reply.length);
#define __GLX_SWAP_REPLY_RETVAL() \
__GLX_SWAP_INT(&reply.retval)
swpal(&reply.retval)
#define __GLX_SWAP_REPLY_SIZE() \
__GLX_SWAP_INT(&reply.size)
swapl(&reply.size)
#endif /* !__GLX_unpack_h__ */