develooper Front page | perl.perl5.porters | Postings from April 2010

[perl #7028] Can't reset() read-only references

Thread Previous | Thread Next
From:
Alexandr Ciornii via RT
Date:
April 30, 2010 08:14
Subject:
[perl #7028] Can't reset() read-only references
Message ID:
rt-3.6.HEAD-27388-1272640489-475.7028-15-0@perl.org
I can't find 'Dump' and 'reset' in debugger's docs. Were they removed?

On Mon May 21 23:37:53 2001, mjtg@cam.ac.uk wrote:
>   DB<1> *pi = \\3.14
> 
>   DB<2> Dump $pi
> SV = RV(0x122dbc) at 0x234708
>   REFCNT = 1
>   FLAGS = (ROK,READONLY)
>   RV = 0x2346e4
>   SV = NV(0x114480) at 0x2346e4
>     REFCNT = 1
>     FLAGS = (NOK,READONLY,pNOK)
>     NV = 3.14
> 
>   DB<3> reset 'p'
> 
>   DB<4> Dump $pi
> SV = RV(0x122dbc) at 0x234708
>   REFCNT = 1
>   FLAGS = (ROK,READONLY)
>   RV = 0x2346e4
>   SV = NV(0x114480) at 0x2346e4
>     REFCNT = 1
>     FLAGS = (NOK,READONLY,pNOK)
>     NV = 3.14
> 
> 
> I don't understand what the code at sv.c line 5928 (in bleadperl) is
> meant to be doing, but it certainly doesn't look right:
> 
>                 if (SvTHINKFIRST(sv)) {
>                     if (!SvREADONLY(sv) && SvROK(sv))
>                         sv_unref(sv);
>                     continue;
>                 }
> 
> Should the "continue" be conditional on something?
> 
> 
> Mike Guy


-- 
Alexandr Ciornii, http://chorny.net


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About