Skip to content

Commit 1dd2a69

Browse files
authored
WTBUILD-278 Make modstat outputs more readable
- Changed the order so that functions are printed before macros.
1 parent aba4b17 commit 1dd2a69

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

layercparse/scan_sources_tool.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -515,19 +515,19 @@ def list_modules(modules: list[Module]) -> None:
515515
print_columns(output)
516516

517517
def list_contents() -> None:
518-
if _args.macros:
519-
print(" == Macros:")
520-
for _, defn in _globals.macros.items():
521-
if not defn.offset or not want_list(defn):
522-
continue
523-
print(f"{defn.locationStr()} {'private' if defn.is_private else 'public'}")
524518
if _args.calls:
525519
print(" == Functions:")
526520
for defn in itertools.chain(_globals.names.values(),
527521
(v for vv in _globals.static_names.values() for v in vv.values())):
528522
if not want_list(defn):
529523
continue
530524
print(f"{defn.locationStr()} {'private' if defn.is_private else 'public'}")
525+
if _args.macros:
526+
print(" == Macros:")
527+
for _, defn in _globals.macros.items():
528+
if not defn.offset or not want_list(defn):
529+
continue
530+
print(f"{defn.locationStr()} {'private' if defn.is_private else 'public'}")
531531
if _args.fields:
532532
print(" == Fields:")
533533
for recname, recdefn in _globals.fields.items():

0 commit comments

Comments
 (0)