projects
/
free-sw
/
xcb
/
libxcb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add xcb_send_fd API
[free-sw/xcb/libxcb]
/
src
/
c_client.py
diff --git
a/src/c_client.py
b/src/c_client.py
index
2aba741
..
cc26f72
100644
(file)
--- a/
src/c_client.py
+++ b/
src/c_client.py
@@
-1787,12
+1787,12
@@
def _c_complex(self):
for field in struct_fields:
length = len(field.c_field_type)
# account for '*' pointer_spec
for field in struct_fields:
length = len(field.c_field_type)
# account for '*' pointer_spec
- if not field.type.fixed_size():
+ if not field.type.fixed_size()
and not self.is_union
:
length += 1
maxtypelen = max(maxtypelen, length)
def _c_complex_field(self, field, space=''):
length += 1
maxtypelen = max(maxtypelen, length)
def _c_complex_field(self, field, space=''):
- if (field.type.fixed_size() or
+ if (field.type.fixed_size() or
self.is_union or
# in case of switch with switch children, don't make the field a pointer
# necessary for unserialize to work
(self.is_switch and field.type.is_switch)):
# in case of switch with switch children, don't make the field a pointer
# necessary for unserialize to work
(self.is_switch and field.type.is_switch)):
@@
-2149,6
+2149,10
@@
def _c_request_helper(self, name, cookie_type, void, regular, aux=False):
# no padding necessary - _serialize() keeps track of padding automatically
_c(' ')
# no padding necessary - _serialize() keeps track of padding automatically
_c(' ')
+ for field in param_fields:
+ if field.isfd:
+ _c(' xcb_send_fd(c, %s);', field.c_field_name)
+
_c(' xcb_ret.sequence = xcb_send_request(c, %s, xcb_parts + 2, &xcb_req);', func_flags)
# free dyn. all. data, if any
_c(' xcb_ret.sequence = xcb_send_request(c, %s, xcb_parts + 2, &xcb_req);', func_flags)
# free dyn. all. data, if any