Skip to content

Commit

Permalink
[GH #836] Catch also Scheduler.destroy and empty Undef bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Sep 25, 2012
1 parent 7913e25 commit ac0b135
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/Parrot/Pmc2c/Method.pm
Expand Up @@ -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 );
Expand Down

0 comments on commit ac0b135

Please sign in to comment.