Skip to content

Commit 5806134

Browse files
committed
regen/embed.pl: Squash duplicate code
Move these to a place common to both
1 parent 4a81385 commit 5806134

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

regen/embed.pl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,14 +537,15 @@ sub embed_h {
537537
my $level= $_->{level};
538538
my $embed= $_->{embed} or next;
539539
my ($flags,$retval,$func,$args) = @{$embed}{qw(flags return_type name args)};
540+
my $full_name = full_name($func, $flags);
541+
next if $full_name eq $func; # Don't output a no-op.
542+
540543
my $ret = "";
541544
my $ind= $level ? " " : "";
542545
$ind .= " " x ($level-1) if $level>1;
543546
my $inner_ind= $ind ? " " : " ";
544547

545548
if ($flags =~ /m/ && $flags =~ /p/) {
546-
my $full_name = full_name($func, $flags);
547-
next if $full_name eq $func; # Don't output a no-op.
548549

549550
# Yields
550551
# #define Perl_func func
@@ -585,8 +586,6 @@ sub embed_h {
585586
elsif ($flags !~ /[omM]/) {
586587
my $argc = scalar @$args;
587588
if ($flags =~ /[T]/) {
588-
my $full_name = full_name($func, $flags);
589-
next if $full_name eq $func; # Don't output a no-op.
590589
$ret = indent_define($func, $full_name, $ind);
591590
}
592591
else {

0 commit comments

Comments
 (0)