X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fc_client.py;h=85ae09b75b40ea36056036c0c033856149706012;hb=a22909c0f513fe28347c56be65a345831c3ce744;hp=8e79480cde1b1a42b0d9a351f2201b48bea00b3a;hpb=22e1013131984a217e9bddeac3a6a4183e35f0c1;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/c_client.py b/src/c_client.py index 8e79480..85ae09b 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -399,8 +399,9 @@ def _c_type_setup(self, name, postfix): if self.need_sizeof: if self.c_sizeof_name not in finished_sizeof: - finished_sizeof.append(self.c_sizeof_name) - _c_serialize('sizeof', self) + if not module.namespace.is_ext or self.name[:2] == module.namespace.prefix: + finished_sizeof.append(self.c_sizeof_name) + _c_serialize('sizeof', self) # _c_type_setup() def _c_helper_absolute_name(prefix, field=None): @@ -1293,11 +1294,13 @@ def _c_iterator(self, name): _c(' xcb_generic_iterator_t child;') _c(' child.data = (%s *)(((char *)R) + %s(R));', self.c_type, self.c_sizeof_name) + _c(' i->index = (char *) child.data - (char *) i->data;') else: _c(' xcb_generic_iterator_t child = %s;', _c_iterator_get_end(self.last_varsized_field, 'R')) + _c(' i->index = child.index;') _c(' --i->rem;') _c(' i->data = (%s *) child.data;', self.c_type) - _c(' i->index = child.index;') + else: _c(' --i->rem;') _c(' ++i->data;') @@ -1937,7 +1940,7 @@ def _c_request_helper(self, name, cookie_type, void, regular, aux=False): _c(' %s xcb_out;', self.c_type) if self.var_followed_by_fixed_fields: _c(' /* in the protocol description, variable size fields are followed by fixed size fields */') - _c(' char *xcb_aux = 0;') + _c(' void *xcb_aux = 0;') for idx, f in enumerate(serial_fields):