Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CSIT-1148: VPPAPIGEN 2nd level import of .api ignored
[vpp.git]
/
src
/
tools
/
vppapigen
/
vppapigen.py
diff --git
a/src/tools/vppapigen/vppapigen.py
b/src/tools/vppapigen/vppapigen.py
index
5cedfb2
..
f3094ec
100755
(executable)
--- a/
src/tools/vppapigen/vppapigen.py
+++ b/
src/tools/vppapigen/vppapigen.py
@@
-685,12
+685,13
@@
class VPPAPI(object):
# Only allow the following object types from imported file
if in_import and not (isinstance(o, Enum) or
isinstance(o, Union) or
# Only allow the following object types from imported file
if in_import and not (isinstance(o, Enum) or
isinstance(o, Union) or
- isinstance(o, Typedef)):
+ isinstance(o, Typedef) or
+ isinstance(o, Import)):
continue
continue
- result.append(o)
-
if isinstance(o, Import):
self.process_imports(o.result, True, result)
if isinstance(o, Import):
self.process_imports(o.result, True, result)
+ else:
+ result.append(o)
# Add message ids to each message.
def add_msg_id(s):
# Add message ids to each message.
def add_msg_id(s):
@@
-764,7
+765,7
@@
def main():
# Debug
if args.debug:
import pprint
# Debug
if args.debug:
import pprint
- pp = pprint.PrettyPrinter(indent=4)
+ pp = pprint.PrettyPrinter(indent=4
, stream=sys.stderr
)
for t in s['Define']:
pp.pprint([t.name, t.flags, t.block])
for t in s['types']:
for t in s['Define']:
pp.pprint([t.name, t.flags, t.block])
for t in s['types']: