Update genOstreamOps.py

这个提交包含在:
rkebichi 编写, GitHub 于 2019-10-09 15:28:59 -04:00 提交
1 父节点 c342215416
当前提交 14c933bedb
1 个文件已更改
+2 -2
+2 -2
查看文件
@@ -98,7 +98,7 @@ FOOTER = \
rx_dict = {
'struct_name': re.compile(r'typedef (?P<struct_name>.*)\n'),
'field_type': re.compile(r'\s+name\[raw_type\]=(?P<field_type>.*)\n'),
'field_type': re.compile(r'\s+name\[type\]=(?P<field_type>.*)\n'),
'field_name': re.compile(r'\s+name\[name\]=(?P<field_name>.*)\n'),
'array_size_val': re.compile(r'\s+name\[array_size\]=(?P<array_size_val>.*)\n'),
}
@@ -151,7 +151,7 @@ def parse_file(infilepath,outfilepath):
tmp_str=tmp_str.replace(field_type,field_type+"["+array_size_val+"]")
f.write(tmp_str+"\n")
tmp_str=""
if flag==1 and key == 'field_name':
if flag==1 and key == 'field_name' and "union" not in field_type:
if tmp_str!="":
f.write(tmp_str+"\n")
tmp_str=""