Author: chromatic
Date: Thu May 17 18:53:38 2007
New Revision: 18581
Modified:
trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
Log:
[PMC] Automatically add enclosing braces around PCCRETURN (see RT #42974).
Modified: trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm (original)
+++ trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm Thu May 17 18:53:38 2007
@@ -235,6 +235,7 @@
my $lineno1 = __LINE__ + 2;
my $lineno2 = __LINE__ + 7;
my $replacement = <<END;
+{
#line $lineno1 $file
/*BEGIN PCCRETURN $returns */
/*BEGIN GENERATED ACCESSORS */
@@ -249,6 +250,7 @@
string_from_const_cstring(interp, $returns_flags, 0), 0);
$goto_string
/*END PCCRETURN $returns */
+}
END
$$body =~ s/\Q$1\E/$replacement/;
}