Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'rurban/pmc2c-unused-gh836'

  • Loading branch information...
commit ce2c408d3627ef0dddfc3b8961ba2cef0070f0d8 2 parents 0525faa + ac0b135
@rurban rurban authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 lib/Parrot/Pmc2c/Method.pm
View
14 lib/Parrot/Pmc2c/Method.pm
@@ -264,16 +264,18 @@ sub decl {
if ($args =~ s/, (\w+ \*?$key)/, SHIM($1)/) {
$body->{data} =~ s/^\s*UNUSED\((\w+)\);?\n//;
}
- if ($body->{data} =~ m/^\s*UNUSED\((INTERP|interp)\);?\n/) {
- $self->{interp_unused} = 1;
- warn "Replace UNUSED(interp) with UNUSED(INTERP) in $pmcname METHOD $meth\n"
- if $1 eq 'interp' and $self->{parent_name} ne 'Null';
- $body->{data} =~ s/^\s*UNUSED\((INTERP|interp)\);?\n//;
- }
if ($body->{data} =~ m/^\s*UNUSED\(SELF\);?\n/) {
$self->{pmc_unused} = 1;
$body->{data} =~ s/^\s*UNUSED\(SELF\);?\n//;
}
+ if ($body->{data} =~ m/^\s*UNUSED\((INTERP|interp)\);?\n/) {
+ $self->{interp_unused} = 1;
+ $body->{data} =~ s/^\s*UNUSED\((INTERP|interp)\);?\n//;
+ warn "Replace UNUSED(interp) with UNUSED(INTERP) in $pmcname METHOD $meth\n"
+ if $1 eq 'interp'
+ and $self->{parent_name} ne 'Null'
+ and $body->{data} != /^\s*$/;
+ }
}
my ( $extern, $newl, $semi );
Please sign in to comment.
Something went wrong with that request. Please try again.