From c06ecf4f38015d4985dd5994aebe5c15908d2f26 Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Sat, 27 Oct 2012 05:18:49 -0400 Subject: [PATCH] yyerror->yyerror_pvn in toke.c:S_new_constant Avoids a strlen. --- toke.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toke.c b/toke.c index e4c1f80..a382619 100644 --- a/toke.c +++ b/toke.c @@ -8974,8 +8974,11 @@ now_ok: /* Check the eval first */ if (!PL_in_eval && SvTRUE(ERRSV)) { - sv_catpvs(ERRSV, "Propagated"); - yyerror(SvPV_nolen_const(ERRSV)); /* Duplicates the message inside eval */ + STRLEN errlen; + const char * errstr; + sv_catpvs(ERRSV, "Propagated"); + errstr = SvPV_const(ERRSV, errlen); + yyerror_pvn(errstr, errlen, 0); /* Duplicates the message inside eval */ (void)POPs; res = SvREFCNT_inc_simple(sv); } -- 2.7.4