aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-10-09 12:39:32 +0200
committerNeale Ranns <nranns@cisco.com>2019-10-10 07:33:42 +0000
commit3ae9f5a90ac23ceaa1d5052cfdab417c1ef8dfdc (patch)
tree8227537e35b4a55428ab15334c83a4591514e21c /src/tools/vppapigen
parent1890e9ce57a4b6dbc732f8f11d78001bea7c5855 (diff)
memif: remove api boilerplate
Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Icab769607c4a5890dc80b8f2661faa7e297c2a27
Diffstat (limited to 'src/tools/vppapigen')
-rw-r--r--src/tools/vppapigen/vppapigen_c.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py
index e85a8980592..00b804dc853 100644
--- a/src/tools/vppapigen/vppapigen_c.py
+++ b/src/tools/vppapigen/vppapigen_c.py
@@ -661,6 +661,7 @@ def generate_c_test_plugin_boilerplate(services, defines, file_crc, module, stre
write('/* Only autoreply is supported (vl_api_{n}_t_hander()) */\n'
.format(n=s.reply))
continue
+ write('#ifndef VL_API_{n}_T_HANLDER\n'.format(n=s.reply.upper()))
write('static void\n')
write('vl_api_{n}_t_handler (vl_api_{n}_t * mp) {{\n'.format(n=s.reply))
write(' vat_main_t * vam = {}_test_main.vat_main;\n'.format(module))
@@ -672,6 +673,7 @@ def generate_c_test_plugin_boilerplate(services, defines, file_crc, module, stre
write(' vam->result_ready = 1;\n')
write(' }\n')
write('}\n')
+ write('#endif\n')
for e in s.events:
if define_hash[e].manual_print: