summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-08-26 15:25:20 -0600
committerKarl Williamson <khw@cpan.org>2016-08-31 20:32:34 -0600
commit4d2e4fbc2785955cbfa81b2e3d57ef5da2f6f856 (patch)
tree36c9bb4a97f37bf8c62eeadfb99a8c845fb0c37d /regen
parent0baa827e0fd16abde2450ecee673f26319010e2d (diff)
downloadperl-4d2e4fbc2785955cbfa81b2e3d57ef5da2f6f856.tar.gz
regen/embed.pl: Allow inline funcs to be named Perl_foo
When inlining an existing public function whose name begins with Perl_, it's best to keep that name, in case someone is calling it that way. Prior to this commit, the name had to be changed to S_foo.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/embed.pl10
1 files changed, 3 insertions, 7 deletions
diff --git a/regen/embed.pl b/regen/embed.pl
index 6007d92c39..342e0171f2 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -44,8 +44,8 @@ sub full_name ($$) { # Returns the function name with potentially the
# prefixes 'S_' or 'Perl_'
my ($func, $flags) = @_;
- return "S_$func" if $flags =~ /[si]/;
return "Perl_$func" if $flags =~ /p/;
+ return "S_$func" if $flags =~ /[si]/;
return $func;
}
@@ -92,12 +92,8 @@ my ($embed, $core, $ext, $api) = setup_embed();
warn "It is nonsensical to require the return value of a void function ($plain_func) to be checked";
}
- my $scope_type_flag_count = 0;
- $scope_type_flag_count++ if $flags =~ /s/;
- $scope_type_flag_count++ if $flags =~ /i/;
- $scope_type_flag_count++ if $flags =~ /p/;
- warn "$plain_func: i, p, and s flags are all mutually exclusive"
- if $scope_type_flag_count > 1;
+ warn "$plain_func: s flag is mutually exclusive from the i and p plags"
+ if $flags =~ /s/ && $flags =~ /[ip]/;
my $splint_flags = "";
if ( $SPLINT && !$commented_out ) {
$splint_flags .= '/*@noreturn@*/ ' if $never_returns;