Skip to content

Commit 3896b1b

Browse files
committed
wikiheaders: Let each subproject specify how to find their property symbols.
1 parent efed3c6 commit 3896b1b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.wikiheaders-options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ versionfname = include/SDL3/SDL_version.h
99
versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
1010
versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
1111
versionmicroregex = \A\#define\s+SDL_MICRO_VERSION\s+(\d+)\Z
12+
apipropertyregex = \A\s*\#\s*define\s+SDL_PROP_
1213
selectheaderregex = \ASDL.*?\.h\Z
1314
projecturl = https://libsdl.org/
1415
wikiurl = https://wiki.libsdl.org

build-scripts/wikiheaders.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
my $incsubdir = 'include';
3333
my $readmesubdir = undef;
3434
my $apiprefixregex = undef;
35+
my $apipropertyregex = undef;
3536
my $versionfname = 'include/SDL_version.h';
3637
my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
3738
my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
@@ -110,6 +111,7 @@
110111
$srcpath = $val, next if $key eq 'srcpath';
111112
$wikipath = $val, next if $key eq 'wikipath';
112113
$apiprefixregex = $val, next if $key eq 'apiprefixregex';
114+
$apipropertyregex = $val, next if $key eq 'apipropertyregex';
113115
$projectfullname = $val, next if $key eq 'projectfullname';
114116
$projectshortname = $val, next if $key eq 'projectshortname';
115117
$wikisubdir = $val, next if $key eq 'wikisubdir';
@@ -1366,7 +1368,7 @@ sub generate_quickref {
13661368
# update strings now that we know everything pending is to be applied to this declaration. Add pending blank lines and the new text.
13671369

13681370
# At Sam's request, don't list property defines with functions. (See #9440)
1369-
my $is_property = /\A\s*\#\s*define\s+SDL_PROP_/;
1371+
my $is_property = (defined $apipropertyregex) ? /$apipropertyregex/ : 0;
13701372
if (!$is_property) {
13711373
if ($blank_lines > 0) {
13721374
while ($blank_lines > 0) {

0 commit comments

Comments
 (0)