From: Nicholas Clark Date: Tue, 26 Jan 2010 12:00:56 +0000 (+0000) Subject: SvIVX() isn't valid on SVt_REGEXP X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e77da3b2183d0f9c5ea81dc5780d9a480fc4fa88;p=p5sagit%2Fp5-mst-13.2.git SvIVX() isn't valid on SVt_REGEXP --- diff --git a/dump.c b/dump.c index 83ced6a..6bfe5f4 100644 --- a/dump.c +++ b/dump.c @@ -1596,7 +1596,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo } if ((type >= SVt_PVIV && type != SVt_PVAV && type != SVt_PVHV && type != SVt_PVCV && !isGV_with_GP(sv) && type != SVt_PVFM - && type != SVt_PVIO) + && type != SVt_PVIO && type != SVt_REGEXP) || (type == SVt_IV && !SvROK(sv))) { if (SvIsUV(sv) #ifdef PERL_OLD_COPY_ON_WRITE diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 3d282d3..e4ccbf5 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -327,7 +327,6 @@ do_test(15, SV = REGEXP\\($ADDR\\) at $ADDR REFCNT = 1 FLAGS = \\(OBJECT,POK,FAKE,pPOK\\) - IV = 0 PV = $ADDR "\\(\\?-xism:tic\\)" CUR = 12 LEN = 0 diff --git a/sv.h b/sv.h index 7d3f1a6..40da47b 100644 --- a/sv.h +++ b/sv.h @@ -1068,6 +1068,7 @@ the scalar's value cannot change unless written to. assert(SvTYPE(_svivx) != SVt_PVCV); \ assert(SvTYPE(_svivx) != SVt_PVFM); \ assert(SvTYPE(_svivx) != SVt_PVIO); \ + assert(SvTYPE(_svivx) != SVt_REGEXP); \ assert(!isGV_with_GP(_svivx)); \ &(((XPVIV*) MUTABLE_PTR(SvANY(_svivx)))->xiv_iv); \ })) @@ -1079,6 +1080,7 @@ the scalar's value cannot change unless written to. assert(SvTYPE(_svuvx) != SVt_PVCV); \ assert(SvTYPE(_svuvx) != SVt_PVFM); \ assert(SvTYPE(_svuvx) != SVt_PVIO); \ + assert(SvTYPE(_svuvx) != SVt_REGEXP); \ assert(!isGV_with_GP(_svuvx)); \ &(((XPVUV*) MUTABLE_PTR(SvANY(_svuvx)))->xuv_uv); \ })) @@ -1090,6 +1092,7 @@ the scalar's value cannot change unless written to. assert(SvTYPE(_svnvx) != SVt_PVCV); \ assert(SvTYPE(_svnvx) != SVt_PVFM); \ assert(SvTYPE(_svnvx) != SVt_PVIO); \ + assert(SvTYPE(_svnvx) != SVt_REGEXP); \ assert(!isGV_with_GP(_svnvx)); \ &(((XPVNV*) MUTABLE_PTR(SvANY(_svnvx)))->xnv_u.xnv_nv); \ }))