Front page | perl.perl5.porters |
Postings from June 2001
Re: the "it" hack
Thread Previous
From:
dLux
Date:
June 11, 2001 04:15
Subject:
Re: the "it" hack
Message ID:
20010611131234.H28156@dlux.hu
/--- On Sun, Jun 10, 2001 at 10:01:51AM +0100, Graham Barr wrote:
| On Sat, Jun 09, 2001 at 07:05:57PM +0100, Simon Cozens wrote:
| > On Sat, Jun 09, 2001 at 09:10:35AM -0700, Richard Soderberg
| > wrote:
| > > I wouldn't mind seeing it in the core, I guess.
| > Do you want to explain what's going on everytime someone's used
| > "sub it"
| > and wonders why their program is now broken, then?
|
| the patch is also questionable. It takes a copy of an SV* without
| refcounting
| it. But refcounting it could also cause problems.
I have not looked at the patch, but as I understand the perl concept
of referencing:
- It must be SvREFCNT_inc-ed when it is copied that to the "it" SV.
- It must be SvREFCNT_dec-ed when the value is overwritten by others
or the current block ends. It is necessary, because we may want to
avoid the "hanging around" referenced hash value even if we don't
use it.
\---
dLux
--
Hal 9000 - "Put down those Windows disks Dave.... Dave? DAVE!!"
Thread Previous