diff options
author | Christian Linhart <chris@DemoRecorder.com> | 2014-11-02 13:47:07 +0100 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2014-11-03 11:23:22 +0100 |
commit | 88f9def9341b8f9c8f45e8a95f6c40ac94fa959f (patch) | |
tree | 04c5a4c8ae058285455c94faa37eacbfd37e3ee9 /xcbgen | |
parent | 691d2b97e5989d6d7006304d81bd8fa128477ca1 (diff) | |
download | xcb-proto-88f9def9341b8f9c8f45e8a95f6c40ac94fa959f.tar.gz |
xcbgen: fields get a parent reference
Objects of type Field get a reference to their parent.
This is needed in the generator to differentiate
field handling dependend on properties of their parent.
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <545627CB.1000606@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 1/8
Patch-Version: V1
Diffstat (limited to 'xcbgen')
-rw-r--r-- | xcbgen/expr.py | 1 | ||||
-rw-r--r-- | xcbgen/xtypes.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/xcbgen/expr.py b/xcbgen/expr.py index e4fb06e..51e738f 100644 --- a/xcbgen/expr.py +++ b/xcbgen/expr.py @@ -22,6 +22,7 @@ class Field(object): self.wire = wire self.auto = auto self.isfd = isfd + self.parent = None class Expression(object): diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py index 45d7568..8ecbaa2 100644 --- a/xcbgen/xtypes.py +++ b/xcbgen/xtypes.py @@ -76,6 +76,7 @@ class Type(object): return complex_type.fields.append(new_field) + new_field.parent = complex_type def make_fd_of(self, module, complex_type, fd_name): ''' |