[libxcb,2/3] c_client: Don't serialise non-wire fields

Submitted by Daniel Stone on April 26, 2017, 4:05 p.m.

Details

Message ID 20170426160546.18352-3-daniels@collabora.com
State New
Headers show
Series "Support lists of FDs" ( rev: 1 ) in XCB

Not browsing as part of any series.

Commit Message

Daniel Stone April 26, 2017, 4:05 p.m.
For when we have a variable-sized field followed by a fixed field, make
sure we do not serialise non-wire fields.

Signed-off-by: Daniel Stone <daniels@collabora.com>
---
 src/c_client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/c_client.py b/src/c_client.py
index 0cbdf30..7358826 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -2379,7 +2379,7 @@  def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
         count = 4
 
         for field in param_fields:
-            if not field.type.fixed_size():
+            if field.wire and not field.type.fixed_size():
                 _c('    /* %s %s */', field.type.c_type, field.c_field_name)
                 # default: simple cast to char *
                 if not field.type.c_need_serialize and not field.type.c_need_sizeof: