On Wed, Jun 29, 2005 at 09:40:38PM -0700, Marvin Humphrey wrote:
> 
> On Jun 27, 2005, at 8:07 PM, Sisyphus wrote:
> >You can also 'printf("%d\n", SvREFCNT(sv));' to view the reference  
> >count
> >from within the C function. I've made use of that from time to time
> >(particularly wrt operator overloading, where I'm often not sure  
> >just what
> >the count is).
> 
> There's been some weirdness in how the reference counts behave when  
> I've created SV*'s from within C.  I couldn't really figure it out.   
> I worked around it in the particular section by passing an extra  
> argument from perl to use for output, so that the C function went  
> from returning an SV to void.

Memory sayeth that it's a bug, but one that can't be fixed because it
would cause Much Breakage in the substantial amount of deployed code that
already works around said bug in various ways.

However I haven't had time to read p5p in a while now, so many of those
neurons have been recycled. I have a project that should unrecycle most of
them, but alas no time to do it in yet.

-- 
     Matt S Trout           Website: http://www.shadowcatsystems.co.uk
  Technical Director        E-mail:  mst (at) shadowcatsystems.co.uk
Shadowcat Systems Ltd.

Reply via email to