X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_ctl.c;h=c6ee3f77c8ccc08c162f866f7b3e3671bb3c40de;hb=6499cc01a61ed62809d392d9c843f37a021fbc35;hp=032ffaa4c6d62743d298b39796dfc3d2b26eb854;hpb=5486870fe7f0fd0e99bf9619d5fd857a5b972014;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_ctl.c b/pp_ctl.c index 032ffaa..c6ee3f7 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1459,7 +1459,8 @@ Perl_qerror(pTHX_ SV *err) sv_catsv(PL_errors, err); else Perl_warn(aTHX_ "%"SVf, SVfARG(err)); - ++PL_error_count; + if (PL_parser) + ++PL_parser->error_count; } OP * @@ -2908,7 +2909,6 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) SAVESPTR(PL_unitcheckav); PL_unitcheckav = newAV(); SAVEFREESV(PL_unitcheckav); - SAVEI8(PL_error_count); #ifdef PERL_MAD SAVEBOOL(PL_madskills); @@ -2918,14 +2918,13 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) /* try to compile it */ PL_eval_root = NULL; - PL_error_count = 0; PL_curcop = &PL_compiling; CopARYBASE_set(PL_curcop, 0); if (saveop && (saveop->op_type != OP_REQUIRE) && (saveop->op_flags & OPf_SPECIAL)) PL_in_eval |= EVAL_KEEPERR; else sv_setpvn(ERRSV,"",0); - if (yyparse() || PL_error_count || !PL_eval_root) { + if (yyparse() || PL_parser->error_count || !PL_eval_root) { SV **newsp; /* Used by POPBLOCK. */ PERL_CONTEXT *cx = &cxstack[cxstack_ix]; I32 optype = 0; /* Might be reset by POPEVAL. */ @@ -4516,7 +4515,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) /* I was having segfault trouble under Linux 2.2.5 after a parse error occured. (Had to hack around it with a test - for PL_error_count == 0.) Solaris doesn't segfault -- + for PL_parser->error_count == 0.) Solaris doesn't segfault -- not sure where the trouble is yet. XXX */ if (IoFMT_GV(datasv)) {