summaryrefslogtreecommitdiff
path: root/xcbgen
diff options
context:
space:
mode:
authorChristoph Reimann <oss@arcor.de>2010-08-16 18:32:13 +0200
committerChristoph Reimann <oss@arcor.de>2010-08-16 18:32:13 +0200
commit76ca2c0b1527541be59c344118c538ba055ad9d8 (patch)
treeee0ded502f67c587ba6e3785b5a62be134a05d47 /xcbgen
parent854e2a05c76ad72bc11fb56c78d707a81e5cf614 (diff)
downloadxcb-proto-76ca2c0b1527541be59c344118c538ba055ad9d8.tar.gz
xcbgen: small fix to store anchestor objects more systematic
xml: small fixes according to Xlib or the spec
Diffstat (limited to 'xcbgen')
-rw-r--r--xcbgen/xtypes.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
index 4836205..1a6c7ce 100644
--- a/xcbgen/xtypes.py
+++ b/xcbgen/xtypes.py
@@ -159,7 +159,7 @@ class ListType(Type):
Type.__init__(self, member.name)
self.is_list = True
self.member = member
- self.parent = list(parent)
+ self.parents = list(parent)
if elt.tag == 'list':
elts = list(elt)
@@ -180,7 +180,7 @@ class ListType(Type):
needlen = True
# See if the length field is already in the structure.
- for parent in self.parent:
+ for parent in self.parents:
for field in parent.fields:
if field.field_name == lenfield_name:
needlen = False
@@ -198,12 +198,12 @@ class ListType(Type):
if self.resolved:
return
self.member.resolve(module)
- self.expr.resolve(module, self.parent)
+ self.expr.resolve(module, self.parents)
# Find my length field again. We need the actual Field object in the expr.
# This is needed because we might have added it ourself above.
if not self.fixed_size():
- for parent in self.parent:
+ for parent in self.parents:
for field in parent.fields:
if field.field_name == self.expr.lenfield_name and field.wire:
self.expr.lenfield = field
@@ -357,7 +357,7 @@ class SwitchType(ComplexType):
def __init__(self, name, elt, *parents):
ComplexType.__init__(self, name, elt)
- self.parent = parents
+ self.parents = parents
# FIXME: switch cannot store lenfields, so it should just delegate the parents
self.lenfield_parent = list(parents) + [self]
# self.fields contains all possible fields collected from the Bitcase objects,
@@ -373,7 +373,7 @@ class SwitchType(ComplexType):
return
# pads = 0
- parents = list(self.parent) + [self]
+ parents = list(self.parents) + [self]
# Resolve all of our field datatypes.
for index, child in enumerate(list(self.elt)):
@@ -413,7 +413,6 @@ class SwitchType(ComplexType):
self.calc_size() # Figure out how big we are
self.resolved = True
- # FIXME: really necessary for Switch??
def make_member_of(self, module, complex_type, field_type, field_name, visible, wire, auto):
if not self.fixed_size():
# We need a length field.
@@ -424,7 +423,7 @@ class SwitchType(ComplexType):
needlen = True
# See if the length field is already in the structure.
- for parent in self.parent:
+ for parent in self.parents:
for field in parent.fields:
if field.field_name == lenfield_name:
needlen = False