generator: generate accessors for events, too

Accessors are generally needed for var-sized fields
and fields after var-sized fields.

Generic events can have ver-sized fields.
Therefore they need accessors.

Message-ID: <1409845851-38950-2-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: libxcb 2/4
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
This commit is contained in:
Christian Linhart 2014-09-04 17:50:49 +02:00
parent 6234225b4b
commit b1e4a3bbd8

View File

@ -3077,6 +3077,10 @@ def c_event(self, name):
if self.name == name: if self.name == name:
_c_type_setup(self, name, ('event',)) _c_type_setup(self, name, ('event',))
# generate accessors
# (needed for fields after var-sized fields, for lists with var-sized elements,
# switches, ...)
_c_accessors(self, name, name)
else: else:
# no type-setup needed for eventcopies # no type-setup needed for eventcopies
# (the type-setup of an eventcopy would overwrite members of the original # (the type-setup of an eventcopy would overwrite members of the original