X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.c;h=10d768f6a27df7fa62fe7591f0d107460926f777;hb=7fddc82f0212c2b411408f0a05ebb86f9e431bd9;hp=5e4bf727f21384f179b22d00b1f1bdfa8aa6c1d1;hpb=29489e7c741791873ea464cb7e13d2b5a19577a7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.c b/sv.c index 5e4bf72..10d768f 100644 --- a/sv.c +++ b/sv.c @@ -733,7 +733,7 @@ S_varname(pTHX_ GV *gv, char *gvtype, PADOFFSET targ, } else if (subscript_type == FUV_SUBSCRIPT_ARRAY) { *SvPVX(name) = '$'; - Perl_sv_catpvf(aTHX_ name, "[%"IVdf"]", aindex); + Perl_sv_catpvf(aTHX_ name, "[%"IVdf"]", (IV)aindex); } else if (subscript_type == FUV_SUBSCRIPT_WITHIN) sv_insert(name, 0, 0, "within ", 7); @@ -1000,6 +1000,7 @@ S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool match) goto do_op2; + case OP_RV2SV: case OP_CUSTOM: case OP_ENTERSUB: match = 1; /* XS or custom code could trigger random warnings */ @@ -6437,8 +6438,7 @@ Perl_sv_pos_u2b(pTHX_ register SV *sv, I32* offsetp, I32* lenp) s += UTF8SKIP(s); if (s >= send) s = send; - if (utf8_mg_pos_init(sv, &mg, &cache, 2, lenp, s, start)) - cache[2] += *offsetp; + utf8_mg_pos_init(sv, &mg, &cache, 2, lenp, s, start); } *lenp = s - start; } @@ -6531,6 +6531,11 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp) cache[0] -= ubackw; *offsetp = cache[0]; + + /* Drop the stale "length" cache */ + cache[2] = 0; + cache[3] = 0; + return; } } @@ -6568,6 +6573,9 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp) cache[0] = len; cache[1] = *offsetp; + /* Drop the stale "length" cache */ + cache[2] = 0; + cache[3] = 0; } *offsetp = len;