diff --git a/.wikiheaders-options b/.wikiheaders-options index 88d48cfbe0..38a2f2731c 100644 --- a/.wikiheaders-options +++ b/.wikiheaders-options @@ -9,6 +9,7 @@ versionfname = include/SDL3/SDL_version.h versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z versionmicroregex = \A\#define\s+SDL_MICRO_VERSION\s+(\d+)\Z +apipropertyregex = \A\s*\#\s*define\s+SDL_PROP_ selectheaderregex = \ASDL.*?\.h\Z projecturl = https://libsdl.org/ wikiurl = https://wiki.libsdl.org diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl index 220f13679b..c2732af52e 100755 --- a/build-scripts/wikiheaders.pl +++ b/build-scripts/wikiheaders.pl @@ -32,6 +32,7 @@ my $wikisubdir = ''; my $incsubdir = 'include'; my $readmesubdir = undef; my $apiprefixregex = undef; +my $apipropertyregex = undef; my $versionfname = 'include/SDL_version.h'; my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z'; my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z'; @@ -110,6 +111,7 @@ if (defined $optionsfname) { $srcpath = $val, next if $key eq 'srcpath'; $wikipath = $val, next if $key eq 'wikipath'; $apiprefixregex = $val, next if $key eq 'apiprefixregex'; + $apipropertyregex = $val, next if $key eq 'apipropertyregex'; $projectfullname = $val, next if $key eq 'projectfullname'; $projectshortname = $val, next if $key eq 'projectshortname'; $wikisubdir = $val, next if $key eq 'wikisubdir'; @@ -1366,7 +1368,7 @@ while (my $d = readdir(DH)) { # update strings now that we know everything pending is to be applied to this declaration. Add pending blank lines and the new text. # At Sam's request, don't list property defines with functions. (See #9440) - my $is_property = /\A\s*\#\s*define\s+SDL_PROP_/; + my $is_property = (defined $apipropertyregex) ? /$apipropertyregex/ : 0; if (!$is_property) { if ($blank_lines > 0) { while ($blank_lines > 0) {