X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Magic.xs;h=735683c600e192599122ac3d8785809a5fcb68d4;hb=ace906d7e76ed647adbd1ab1243ac9bdbde9b1d5;hp=cc403646a401293a8f473da988ab4f6453ee2229;hpb=4ff0f6dd08624463de49131d8a1375e857077b4b;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/Magic.xs b/Magic.xs index cc40364..735683c 100644 --- a/Magic.xs +++ b/Magic.xs @@ -1022,7 +1022,7 @@ STATIC U32 vmg_svt_len(pTHX_ SV *sv, MAGIC *mg) { svr = POPs; ret = SvOK(svr) ? (U32) SvUV(svr) : len; if (t == SVt_PVAV) - --ret; + --ret; PUTBACK; FREETMPS; @@ -1098,8 +1098,16 @@ STATIC int vmg_svt_free(pTHX_ SV *sv, MAGIC *mg) { #endif has_err = SvTRUE(ERRSV); - if (IN_PERL_COMPILETIME && !had_err && has_err) - ++PL_error_count; + if (IN_PERL_COMPILETIME && !had_err && has_err) { + if (PL_errors) + sv_catsv(PL_errors, ERRSV); + else + Perl_warn(aTHX_ "%s", SvPV_nolen(ERRSV)); +#ifdef PL_parser + if (PL_parser) +#endif + ++PL_error_count; + } SPAGAIN; svr = POPs;