summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi/vapi_c_gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/vapi/vapi_c_gen.py')
-rwxr-xr-xsrc/vpp-api/vapi/vapi_c_gen.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vpp-api/vapi/vapi_c_gen.py b/src/vpp-api/vapi/vapi_c_gen.py
index 1fae5b3310a..f0a284ccbc1 100755
--- a/src/vpp-api/vapi/vapi_c_gen.py
+++ b/src/vpp-api/vapi/vapi_c_gen.py
@@ -19,13 +19,13 @@ class CField(Field):
else:
return "vl_api_string_t %s;" % (self.name)
else:
- if self.len is not None:
+ if self.len is not None and type(self.len) != dict:
return "%s %s[%d];" % (self.type.get_c_name(), self.name, self.len)
else:
return "%s %s;" % (self.type.get_c_name(), self.name)
def get_swap_to_be_code(self, struct, var):
- if self.len is not None:
+ if self.len is not None and type(self.len) != dict:
if self.len > 0:
return "do { unsigned i; for (i = 0; i < %d; ++i) { %s } }"\
" while(0);" % (
@@ -46,7 +46,7 @@ class CField(Field):
return self.type.get_swap_to_be_code(struct, "%s" % var)
def get_swap_to_host_code(self, struct, var):
- if self.len is not None:
+ if self.len is not None and type(self.len) != dict:
if self.len > 0:
return "do { unsigned i; for (i = 0; i < %d; ++i) { %s } }"\
" while(0);" % (