summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi/vapi_c_gen.py
diff options
context:
space:
mode:
authorOle Trøan <otroan@employees.org>2018-03-05 21:53:35 +0000
committerDave Wallace <dwallacelf@gmail.com>2018-03-05 23:05:28 +0000
commit2de1f15355f9e183e46ee4ea94523a7dd4921ec0 (patch)
treef7018d83cbbc6b4283bae39d464acf77e8f07b10 /src/vpp-api/vapi/vapi_c_gen.py
parent88c062119b5e94ef19e02f007e38ee119b02218f (diff)
Revert "API: Add service definitions for events and singleton messages."
This reverts commit f7b7fa53b7eaec81d8c00c1023fb7d01f1f9761f. Change-Id: I87496342943248e94f01ada31459f387c0a3a610 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi_c_gen.py')
-rwxr-xr-xsrc/vpp-api/vapi/vapi_c_gen.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/vpp-api/vapi/vapi_c_gen.py b/src/vpp-api/vapi/vapi_c_gen.py
index 60c54e4f031..4b7da6a1f15 100755
--- a/src/vpp-api/vapi/vapi_c_gen.py
+++ b/src/vpp-api/vapi/vapi_c_gen.py
@@ -70,13 +70,6 @@ class CStruct(Struct):
def __init__(self, name, fields):
super(CStruct, self).__init__(name, fields)
- def duplicate_barrier(func):
- def func_wrapper(self):
- name = self.get_c_name()
- return "#ifndef defined_{}\n#define defined_{}\n{}\n#endif".format(name, name, func(self))
- return func_wrapper
-
- @duplicate_barrier
def get_c_def(self):
return "\n".join([
"typedef struct __attribute__((__packed__)) {",
@@ -278,13 +271,6 @@ class CMessage (Message):
"}",
])
- def duplicate_barrier(func):
- def func_wrapper(self):
- name = self.get_payload_struct_name()
- return "#ifndef defined_{}\n#define defined_{}\n{}\n#endif".format(name, name, func(self))
- return func_wrapper
-
- @duplicate_barrier
def get_c_def(self):
if self.has_payload():
return "\n".join([
@@ -599,12 +585,9 @@ def gen_json_unified_header(parser, logger, j, io, name):
print("")
function_attrs = "static inline "
for t in parser.types_by_json[j].values():
- print("#ifndef defined_inline_%s" % t.get_c_name())
- print("#define defined_inline_%s" % t.get_c_name())
print("%s%s" % (function_attrs, t.get_swap_to_be_func_def()))
print("")
print("%s%s" % (function_attrs, t.get_swap_to_host_func_def()))
- print("#endif")
print("")
for m in parser.messages_by_json[j].values():
if m.has_payload():