aboutsummaryrefslogtreecommitdiff
path: root/libxcb/xcb-proto/xcbgen/xtypes.py
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-02 19:44:36 +0000
committermarha <marha@users.sourceforge.net>2009-12-02 19:44:36 +0000
commit57d9bcf864f9cb9f664db5ebe3ea3933aae3c96f (patch)
treee238147f048f84c45b4d2d0de99c7939d6bb5d1d /libxcb/xcb-proto/xcbgen/xtypes.py
parent314d225f3a60cc0ea63c292a2c2ffe3609e7c739 (diff)
downloadvcxsrv-57d9bcf864f9cb9f664db5ebe3ea3933aae3c96f.tar.gz
vcxsrv-57d9bcf864f9cb9f664db5ebe3ea3933aae3c96f.tar.bz2
vcxsrv-57d9bcf864f9cb9f664db5ebe3ea3933aae3c96f.zip
Updated to xcb-proto-1.6
Diffstat (limited to 'libxcb/xcb-proto/xcbgen/xtypes.py')
-rw-r--r--libxcb/xcb-proto/xcbgen/xtypes.py28
1 files changed, 4 insertions, 24 deletions
diff --git a/libxcb/xcb-proto/xcbgen/xtypes.py b/libxcb/xcb-proto/xcbgen/xtypes.py
index 30617b8f4..01d765e59 100644
--- a/libxcb/xcb-proto/xcbgen/xtypes.py
+++ b/libxcb/xcb-proto/xcbgen/xtypes.py
@@ -235,15 +235,15 @@ class ExprType(Type):
def fixed_size(self):
return True
-class SizedPadType(Type):
+class PadType(Type):
'''
- Derived class which represents a padding field of given size.
+ Derived class which represents a padding field.
'''
- def __init__(self, size):
+ def __init__(self, elt):
Type.__init__(self, tcard8.name)
self.is_pad = True
self.size = 1
- self.nmemb = int(size)
+ self.nmemb = 1 if (elt == None) else int(elt.get('bytes'))
def resolve(self, module):
self.resolved = True
@@ -251,13 +251,6 @@ class SizedPadType(Type):
def fixed_size(self):
return True
-class PadType(SizedPadType):
- '''
- Derived class which represents a padding field of given type.
- '''
- def __init__(self, elt):
- self.nmemb = "1" if (elt == None) else elt.get('bytes')
- SizedPadType.__init__(self, self.nmemb)
class ComplexType(Type):
'''
@@ -281,7 +274,6 @@ class ComplexType(Type):
# Resolve all of our field datatypes.
for child in list(self.elt):
- value_mask_pad = None
if child.tag == 'pad':
field_name = 'pad' + str(pads)
fkey = 'CARD8'
@@ -308,7 +300,6 @@ class ComplexType(Type):
fkey = 'CARD32'
type = ListType(child, module.get_type(fkey), self)
visible = True
- value_mask_pad = child.get('value-mask-pad')
else:
# Hit this on Reply
continue
@@ -320,17 +311,6 @@ class ComplexType(Type):
# Recursively resolve the type (could be another structure, list)
type.resolve(module)
- # Add a value-mask-pad if necessary
- if value_mask_pad != None:
- vmp_field_name = 'pad' + str(pads)
- vmp_fkey = 'CARD8'
- vmp_type = SizedPadType(value_mask_pad)
- pads = pads + 1
- vmp_visible = False
- vmp_field_type = module.get_type_name(vmp_fkey)
- vmp_type.make_member_of(module, self, vmp_field_type, vmp_field_name, vmp_visible, True, False)
- vmp_type.resolve(module)
-
self.calc_size() # Figure out how big we are
self.resolved = True