Skip to content

Commit

Permalink
Temporary fix for ntwmi.h
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Mar 28, 2024
1 parent f0337d1 commit f2bdc90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ def split_header_to_chunks(path: Path) -> List[Chunk]:
# Remove block comments.
code = re.sub(r'/\*.*?\*/', lambda x: re.sub(r'[^\n]', '', x.group(0)), code, flags=re.DOTALL)

# Temporary fix.
if path.name == 'ntwmi.h':
code = code.replace('\n} PERFINFO_CONTIGUOUS_PAGE_GENERATE, PERFINFO_CONTIGUOUS_PAGE_GENERATE;\n', '\n} PERFINFO_CONTIGUOUS_PAGE_GENERATE;\n')

# Remove extern "C" declarations.
code = code.replace('\n#ifdef __cplusplus\nextern "C" {\n#endif\n', '\n\n\n\n')
code = code.replace('\n#ifdef __cplusplus\n}\n#endif\n', '\n\n\n\n')
Expand Down

0 comments on commit f2bdc90

Please sign in to comment.