Skip to content

Commit ac69789

Browse files
[libc][docgen] Use Macro for macro table name
Otherwise we render the table under the Macros section with a column header that says Function when it should say Macro.
1 parent b86a599 commit ac69789

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libc/utils/docgen/docgen.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ def load_api(header: Header) -> Dict:
9292
return json.loads(api)
9393

9494

95-
def print_tbl_dir():
95+
def print_tbl_dir(name):
9696
print(
9797
f"""
9898
.. list-table::
9999
:widths: auto
100100
:align: center
101101
:header-rows: 1
102102
103-
* - Function
103+
* - {name}
104104
- Implemented
105105
- C23 Standard Section
106106
- POSIX.1-2017 Standard Section"""
@@ -112,7 +112,7 @@ def print_functions_rst(header: Header, functions: Dict):
112112
print(tbl_hdr)
113113
print("=" * len(tbl_hdr))
114114

115-
print_tbl_dir()
115+
print_tbl_dir("Function")
116116

117117
for name in sorted(functions.keys()):
118118
print(f" * - {name}")
@@ -138,7 +138,7 @@ def print_macros_rst(header: Header, macros: Dict):
138138
print(tbl_hdr)
139139
print("=" * len(tbl_hdr))
140140

141-
print_tbl_dir()
141+
print_tbl_dir("Macro")
142142

143143
for name in sorted(macros.keys()):
144144
print(f" * - {name}")

0 commit comments

Comments
 (0)