summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <freddy77@gmail.com>2020-09-23 10:30:11 +0100
committerFrediano Ziglio <freddy77@gmail.com>2021-02-22 09:11:33 +0000
commitbd15c96f545b100c1c872cf57b45fa0b54481cc9 (patch)
tree8fcd19c228cdf2e0404bff15e14cc62e103f5e8b
parenta627a14af0430c2c76ae2951d9b977ad1c8dabcb (diff)
codegen: Propagate zero_terminated attribute
Currently the attribute is not used. However we would like to make sure when present that the array is always zero terminated to simplify usages after demarshalling. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Victor Toso <victortoso@redhat.com>
-rw-r--r--python_modules/ptypes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
index 32c3e16..e3eb8fd 100644
--- a/python_modules/ptypes.py
+++ b/python_modules/ptypes.py
@@ -18,7 +18,7 @@ def get_named_types():
# only to attributes that affect pointer or array attributes, as these
# are member local types, unlike e.g. a Struct that may be used by
# other members
-propagated_attributes=["ptr_array", "nonnull", "chunk"]
+propagated_attributes=["ptr_array", "nonnull", "chunk", "zero_terminated"]
valid_attributes_generic=set([
# embedded/appended at the end of the resulting C structure