mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
embed.pl: Swap order of conditionals
It is easier to understand when the nearly trivial case is gotten out of the way first.
This commit is contained in:
parent
46c37430a0
commit
e4cec3d716
@ -5007,8 +5007,19 @@ sub find_undefs {
|
||||
# declarations
|
||||
next unless $line->{type} eq 'content';
|
||||
|
||||
# First, for #defines.
|
||||
if ($line->{sub_type} eq '#define') {
|
||||
# Everything but #defines. All we care about are visibility
|
||||
# declarations.
|
||||
if ($line->{sub_type} ne '#define') {
|
||||
|
||||
next unless $line->{sub_type} eq 'text';
|
||||
|
||||
# Only comments have apidoc lines.
|
||||
next unless $line->{flat} eq "";
|
||||
|
||||
next unless $line->{line} =~ / ^ =for \s+ apidoc /mx;
|
||||
process_apidoc_lines($hdr, split /\n/, $line->{line});
|
||||
}
|
||||
else {
|
||||
|
||||
# HeaderParser stripped off most everything.
|
||||
my $name = $line->{flat};
|
||||
@ -5055,17 +5066,6 @@ sub find_undefs {
|
||||
|
||||
$always_undefs{$name} = 1;
|
||||
}
|
||||
else {
|
||||
|
||||
# Otherwise check for a visibility declaration.
|
||||
next unless $line->{sub_type} eq 'text';
|
||||
|
||||
# Only comments have apidoc lines.
|
||||
next unless $line->{flat} eq "";
|
||||
|
||||
next unless $line->{line} =~ / ^ =for \s+ apidoc /mx;
|
||||
process_apidoc_lines($hdr, split /\n/, $line->{line});
|
||||
}
|
||||
}
|
||||
} # Done with headers
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user