[PATCH 1/2] Don't declare xcb_req as static

Adam Jackson <[email protected]>
Newsgroups gmane.comp.freedesktop.xcb
Message-ID <[email protected]>
Doing so forces the compiler to allocate storage for the symbol in
.data, which means 24 bytes of dirty data and a relocation per request
function.

   text	   data	    bss	    dec	    hex	filename
  88888	   7136	      8	  96032	  17720	src/.libs/libxcb-glx.so.before
  92432	    680	      8	  93120	  16bc0	src/.libs/libxcb-glx.so.after

Signed-off-by: Adam Jackson <[email protected]>
---
 src/c_client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/c_client.py b/src/c_client.py
index 57de3fb..3b61f35 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -2319,7 +2319,7 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
     dimension = count + 2
 
     _c('{')
-    _c('    static const xcb_protocol_request_t xcb_req = {')
+    _c('    const xcb_protocol_request_t xcb_req = {')
     _c('        .count = %d,', count)
     _c('        .ext = %s,', func_ext_global)
     _c('        .opcode = %s,', self.c_request_name.upper())
-- 
2.13.0

_______________________________________________
Xcb mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xcb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.