summaryrefslogtreecommitdiff
path: root/regen/embed.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-02-27 08:19:32 -0700
committerKarl Williamson <khw@cpan.org>2020-03-01 09:02:08 -0700
commit29f5f37e4b04514c3cc2ee0be3463b4868b88e74 (patch)
tree707aeae31710ebc3d9be451bd52a89522a13c30f /regen/embed.pl
parent8069a3d04a7e597354209c07c2d47dca34541e99 (diff)
downloadperl-29f5f37e4b04514c3cc2ee0be3463b4868b88e74.tar.gz
regen/embed.pl: Force F or f flags on ... fcns
This makes sure that a function with varargs arguments is marked as format or non-format, so that a such a new function can't be added without considering if it should be marked as 'f'.
Diffstat (limited to 'regen/embed.pl')
-rwxr-xr-xregen/embed.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/regen/embed.pl b/regen/embed.pl
index bad39d7fa2..6387a53bb8 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -81,7 +81,7 @@ my ($embed, $core, $ext, $api) = setup_embed();
}
my ($flags,$retval,$plain_func,@args) = @$_;
- if ($flags =~ / ( [^AabCDdEefGhiMmNnOoPpRrSsTUuWXx] ) /x) {
+ if ($flags =~ / ( [^AabCDdEefFGhiMmNnOoPpRrSsTUuWXx] ) /x) {
die_at_end "flag $1 is not legal (for function $plain_func)";
}
my @nonnull;
@@ -231,6 +231,10 @@ my ($embed, $core, $ext, $api) = setup_embed();
$prefix, $pat, $args;
}
}
+ elsif ((grep { $_ eq '...' } @args) && $flags !~ /F/) {
+ die_at_end "$plain_func: Function with '...' arguments must have"
+ . " f or F flag";
+ }
if ( @attrs ) {
$ret .= "\n";
$ret .= join( "\n", map { "\t\t\t$_" } @attrs );