On Monday 10 March 2008 14:31:27 Will Coleda wrote:
> I know "replace" is invalid (that's why I marked it with a comment).
> That doesn't stop pmc2c.pl from trying to convert that invocation of
> Parrot_PCCINVOKE when it shouldn't.
The regex is in lib/Parrot/Pmc2c/PCCMETHOD.pm, specifically
rewrite_pccmethod():
my $signature_re = qr{
(
(
\( ([^\(]*) \) # results
\s* # optional whitespace
= # results equals PCCINVOKE invocation
\s* # optional whitespace
)? # results are optional
PCCINVOKE # method name
\s* # optional whitespace
\( ([^\(]*) \) # parameters
;? # optional semicolon
)
}sx;
Throwing \b in front of PCCINVOKE seems to do the trick, so r26300 gives you
back your nice C errors and excludes the Perl stack trace.
Nice catch. I had to stare at this for a few minutes to figure it out.
-- c