diff options
author | Christian Linhart <chris@demorecorder.com> | 2014-09-03 10:10:49 +0200 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2014-10-20 12:21:21 +0200 |
commit | fdb291b414a7afc2c2326124b8ca11d6846cd7b9 (patch) | |
tree | 01762053862a7408fc35565920eabf425a3bbc10 /src/c_client.py | |
parent | a7c75be5b1e2da32f7ce2c255972178e7d4b7598 (diff) |
no typename for nested structs
Nested structs which are generated for named case and bitcase
do not get a typename anymore, i.e., they are anonymous structs.
Reasons for this change:
* Prior typenames have caused nameclashes
* Prior typenames introduced names in the global namespace which
did not start with the xcb prefix.
This change is safe with respect to API compatibility because:
I have searched for instances of named bitcases and there's only one place
where they are used, and that's in xkb.xml: reply GetKbdByName.
( no need to search for <case> because it was introduced after the last release )
The reply GetKbdByName is broken in its current form in the xkb.xml anyways,
so it is most probably not used anywhere.
So, my conclusion is that we can safely omit named types for nested structs.
No need for an attribute.
Message-ID: <1409731849-51897-1-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: Re: [Xcb] names of nested structs of named bitcase/case are prone to nameclashes. Solution?
Patch-Set: NestedStructTypenames
Patch-Number: libxcb 1/1
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/c_client.py')
-rw-r--r-- | src/c_client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c_client.py b/src/c_client.py index 0a1f877..56a1766 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -1804,7 +1804,7 @@ def _c_complex(self, force_packed = False): for b in self.bitcases: space = '' if b.type.has_name: - _h(' struct _%s {', b.c_field_name) + _h(' struct {') space = ' ' for field in b.type.fields: _c_complex_field(self, field, space) |