diff options
author | Frediano Ziglio <freddy77@gmail.com> | 2020-09-18 08:52:38 +0100 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2021-02-22 09:11:30 +0000 |
commit | a627a14af0430c2c76ae2951d9b977ad1c8dabcb (patch) | |
tree | c7c3e5a21b712935a5153769ec414be4b7cd529d /python_modules | |
parent | 6838f30079e6401f89597f1209f09bdea257ce28 (diff) |
codegen: Propagate attributes to element under pointers
Current propagated attributes are propagated only from member to
member type.
But for pointers you probably want to use propagated attribus to
underlying type (like an array for instance).
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Diffstat (limited to 'python_modules')
-rw-r--r-- | python_modules/ptypes.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index 71bb7f7..32c3e16 100644 --- a/python_modules/ptypes.py +++ b/python_modules/ptypes.py @@ -641,6 +641,8 @@ class Member(Containee): for i in propagated_attributes: if self.has_attr(i): self.member_type.attributes[i] = self.attributes[i] + if self.member_type.is_pointer(): + self.member_type.target_type.attributes[i] = self.attributes[i] return self def contains_member(self, member): |