aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen_c.py
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-02-02 09:21:52 +0000
committerOle Tr�an <otroan@employees.org>2021-02-03 15:09:50 +0000
commit9302cfea9ded05f01fb84a77d248b8787ec2cac5 (patch)
tree4fb2fb8475f19bd15c44dac77e78c870438c01dd /src/tools/vppapigen/vppapigen_c.py
parent6d467b3ad530bef468a1ab3c6f80a6c2ab6e08d8 (diff)
vppapigen: Support an 'autoendian' keyword for message definitions in
.api files Type: feature Make the auto-endian nature explicit, rather than hidden in the x_api.c file. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ibe647117ceeaf6f99a38a96576a5a41a3cbb1615
Diffstat (limited to 'src/tools/vppapigen/vppapigen_c.py')
-rw-r--r--src/tools/vppapigen/vppapigen_c.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py
index 0727619a803..0ded2af7a52 100644
--- a/src/tools/vppapigen/vppapigen_c.py
+++ b/src/tools/vppapigen/vppapigen_c.py
@@ -1329,8 +1329,9 @@ def generate_c_boilerplate(services, defines, counters, file_crc,
' .cleanup = vl_noop_handler,\n'
' .endian = vl_api_{n}_t_endian,\n'
' .print = vl_api_{n}_t_print,\n'
- ' .is_autoendian = 0}};\n'
- .format(n=s.caller, ID=s.caller.upper()))
+ ' .is_autoendian = {auto}}};\n'
+ .format(n=s.caller, ID=s.caller.upper(),
+ auto=d.autoendian))
write(' vl_msg_api_config (&c);\n')
try:
d = define_hash[s.reply]
@@ -1341,8 +1342,9 @@ def generate_c_boilerplate(services, defines, counters, file_crc,
' .cleanup = vl_noop_handler,\n'
' .endian = vl_api_{n}_t_endian,\n'
' .print = vl_api_{n}_t_print,\n'
- ' .is_autoendian = 0}};\n'
- .format(n=s.reply, ID=s.reply.upper()))
+ ' .is_autoendian = {auto}}};\n'
+ .format(n=s.reply, ID=s.reply.upper(),
+ auto=d.autoendian))
write(' vl_msg_api_config (&c);\n')
except KeyError:
pass