From: David Mitchell Date: Sun, 16 Aug 2009 15:19:04 +0000 (+0100) Subject: sv_peek(): SvOOK offset is no longer in IVX X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5115136b5ada1a3245a69b04d93664e445e85eb1;p=p5sagit%2Fp5-mst-13.2.git sv_peek(): SvOOK offset is no longer in IVX --- diff --git a/dump.c b/dump.c index af735b5..e7f5a1d 100644 --- a/dump.c +++ b/dump.c @@ -505,8 +505,11 @@ Perl_sv_peek(pTHX_ SV *sv) else { SV * const tmp = newSVpvs(""); sv_catpv(t, "("); - if (SvOOK(sv)) - Perl_sv_catpvf(aTHX_ t, "[%s]", pv_display(tmp, SvPVX_const(sv)-SvIVX(sv), SvIVX(sv), 0, 127)); + if (SvOOK(sv)) { + STRLEN delta; + SvOOK_offset(sv, delta); + Perl_sv_catpvf(aTHX_ t, "[%s]", pv_display(tmp, SvPVX_const(sv)-delta, delta, 0, 127)); + } Perl_sv_catpvf(aTHX_ t, "%s)", pv_display(tmp, SvPVX_const(sv), SvCUR(sv), SvLEN(sv), 127)); if (SvUTF8(sv)) Perl_sv_catpvf(aTHX_ t, " [UTF8 \"%s\"]",