mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 18:07:40 +00:00
wikiheaders: Allow parts of the headers to be ignored.
The specific cases here were SDL_size_mul_overflow_builtin and SDL_size_add_overflow_builtin, which are forced-inline symbols in SDL_stdinc.h that have to exist, but aren't really part of the public API, and thus shouldn't be exported as documentation.
This commit is contained in:
parent
e4f097805b
commit
21bc72bef1
3 changed files with 18 additions and 3 deletions
|
@ -594,6 +594,7 @@ while (my $d = readdir(DH)) {
|
|||
open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
|
||||
|
||||
my @contents = ();
|
||||
my $ignoring_lines = 0;
|
||||
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
|
@ -606,7 +607,18 @@ while (my $d = readdir(DH)) {
|
|||
# Since a lot of macros are just preprocessor logic spam and not all macros are worth documenting anyhow, we only pay attention to them when they have a Doxygen comment attached.
|
||||
# Functions and other things are a different story, though!
|
||||
|
||||
if (/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) { # a function declaration without a doxygen comment?
|
||||
if ($ignoring_lines && /\A\s*\#\s*endif\s*\Z/) {
|
||||
$ignoring_lines = 0;
|
||||
push @contents, $_;
|
||||
next;
|
||||
} elsif ($ignoring_lines) {
|
||||
push @contents, $_;
|
||||
next;
|
||||
} elsif (/\A\s*\#\s*ifndef\s+SDL_WIKI_DOCUMENTATION_SECTION\s*\Z/) {
|
||||
$ignoring_lines = 1;
|
||||
push @contents, $_;
|
||||
next;
|
||||
} elsif (/\A\s*extern\s+(SDL_DEPRECATED\s+|)DECLSPEC/) { # a function declaration without a doxygen comment?
|
||||
$symtype = 1; # function declaration
|
||||
@templines = ();
|
||||
$decl = $_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue