In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c490b21c04c1b227f71571c6c3091caea429d9c6?hp=580561a3a5dd3bfef87627781ac362004e3d87b5>
- Log ----------------------------------------------------------------- commit c490b21c04c1b227f71571c6c3091caea429d9c6 Author: Nicholas Clark <[email protected]> Date: Wed Nov 18 17:30:03 2009 +0000 Abolish xio_lines from struct PVIO - store IoLINES() in the IVX slot. M sv.h commit 3cf51070223b095664012011bc367370eda3074c Author: Nicholas Clark <[email protected]> Date: Wed Nov 18 16:53:12 2009 +0000 PVIOs don't use the SvIVX slot. M dump.c M ext/Devel-Peek/t/Peek.t M sv.h ----------------------------------------------------------------------- Summary of changes: dump.c | 3 ++- ext/Devel-Peek/t/Peek.t | 2 +- sv.h | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dump.c b/dump.c index 70efde4..54999ad 100644 --- a/dump.c +++ b/dump.c @@ -1587,7 +1587,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo return; } if ((type >= SVt_PVIV && type != SVt_PVAV && type != SVt_PVHV - && type != SVt_PVCV && !isGV_with_GP(sv) && type != SVt_PVFM) + && type != SVt_PVCV && !isGV_with_GP(sv) && type != SVt_PVFM + && type != SVt_PVIO) || (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 4a4d274..aeb36d0 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -616,7 +616,7 @@ do_test(25, SV = PVIO\\($ADDR\\) at $ADDR REFCNT = 3 FLAGS = \\(OBJECT\\) - IV = 0 + IV = 0 # $] < 5.011 NV = 0 # $] < 5.011 STASH = $ADDR\s+"IO::Handle" IFP = $ADDR diff --git a/sv.h b/sv.h index 0146de4..b452b36 100644 --- a/sv.h +++ b/sv.h @@ -529,7 +529,7 @@ struct xpvfm { DIR * xiou_dirp; /* for opendir, readdir, etc */ \ void * xiou_any; /* for alignment */ \ } xio_dirpu; \ - IV xio_lines; /* $. */ \ + /* IV xio_lines is now in IVX $. */ \ IV xio_page; /* $% */ \ IV xio_page_len; /* $= */ \ IV xio_lines_left; /* $- */ \ @@ -1071,6 +1071,7 @@ the scalar's value cannot change unless written to. assert(SvTYPE(_svivx) != SVt_PVHV); \ assert(SvTYPE(_svivx) != SVt_PVCV); \ assert(SvTYPE(_svivx) != SVt_PVFM); \ + assert(SvTYPE(_svivx) != SVt_PVIO); \ assert(!isGV_with_GP(_svivx)); \ &(((XPVIV*) MUTABLE_PTR(SvANY(_svivx)))->xiv_iv); \ })) @@ -1081,6 +1082,7 @@ the scalar's value cannot change unless written to. assert(SvTYPE(_svuvx) != SVt_PVHV); \ assert(SvTYPE(_svuvx) != SVt_PVCV); \ assert(SvTYPE(_svuvx) != SVt_PVFM); \ + assert(SvTYPE(_svuvx) != SVt_PVIO); \ assert(!isGV_with_GP(_svuvx)); \ &(((XPVUV*) MUTABLE_PTR(SvANY(_svuvx)))->xuv_uv); \ })) @@ -1315,7 +1317,7 @@ the scalar's value cannot change unless written to. #define IoOFP(sv) ((XPVIO*) SvANY(sv))->xio_ofp #define IoDIRP(sv) ((XPVIO*) SvANY(sv))->xio_dirp #define IoANY(sv) ((XPVIO*) SvANY(sv))->xio_any -#define IoLINES(sv) ((XPVIO*) SvANY(sv))->xio_lines +#define IoLINES(sv) ((XPVIO*) SvANY(sv))->xiv_u.xivu_iv #define IoPAGE(sv) ((XPVIO*) SvANY(sv))->xio_page #define IoPAGE_LEN(sv) ((XPVIO*) SvANY(sv))->xio_page_len #define IoLINES_LEFT(sv)((XPVIO*) SvANY(sv))->xio_lines_left -- Perl5 Master Repository
