mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-20 02:08:13 +00:00
gendynapi.py: Ignore wiki documentation blocks.
Otherwise, it thinks SDL_CreateThread, etc, are real functions. Reference Issue #9890.
This commit is contained in:
@@ -75,8 +75,21 @@ def main():
|
|||||||
parsing_comment = False
|
parsing_comment = False
|
||||||
current_comment = ""
|
current_comment = ""
|
||||||
|
|
||||||
|
ignore_wiki_documentation = False
|
||||||
|
|
||||||
for line in input:
|
for line in input:
|
||||||
|
|
||||||
|
# Skip lines if we're in a wiki documentation block.
|
||||||
|
if ignore_wiki_documentation:
|
||||||
|
if line.startswith("#endif"):
|
||||||
|
ignore_wiki_documentation = False
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Discard wiki documentions blocks.
|
||||||
|
if line.startswith("#ifdef SDL_WIKI_DOCUMENTATION_SECTION"):
|
||||||
|
ignore_wiki_documentation = True
|
||||||
|
continue
|
||||||
|
|
||||||
# Discard pre-processor directives ^#.*
|
# Discard pre-processor directives ^#.*
|
||||||
if line.startswith("#"):
|
if line.startswith("#"):
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user