summaryrefslogtreecommitdiff
path: root/regen/embed.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-05-12 11:31:10 -0600
committerKarl Williamson <khw@cpan.org>2016-05-12 20:19:59 -0600
commitda8a4494ec9f611cacc23e2f2bee383f51567ada (patch)
tree60ed8431640d56fe1a2040a10f37f8b3d67b193f /regen/embed.pl
parent5ff52e3ca85f534d7e9cc92421be53c783fc747b (diff)
downloadperl-da8a4494ec9f611cacc23e2f2bee383f51567ada.tar.gz
regen/embed.pl: Don't: #define FOO FOO
Doing so would be useless. This doesn't currently happen, but would in a couple of commits.
Diffstat (limited to 'regen/embed.pl')
-rwxr-xr-xregen/embed.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/regen/embed.pl b/regen/embed.pl
index e06d764fe4..11b2e94f39 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -303,7 +303,9 @@ sub embed_h {
unless ($flags =~ /[om]/) {
my $args = scalar @args;
if ($flags =~ /n/) {
- $ret = hide($func, full_name($func, $flags));
+ my $full_name = full_name($func, $flags);
+ next if $full_name eq $func; # Don't output a no-op.
+ $ret = hide($func, $full_name);
}
elsif ($args and $args[$args-1] =~ /\.\.\./) {
if ($flags =~ /p/) {