At 09:23 AM 3/20/2001 -0500, Kort, Eric wrote:
>Thanks again Dan.  One more (?) question below...
>
> > -----Original Message-----
> > From: Dan Sugalski [mailto:[EMAIL PROTECTED]]
> >....av_fetch returns a pointer to the SV in the
> > array, and perl generally assumes you'll make a copy of it if
> > you want to
> > put it elsewhere. You may need to increment the refcount for
> > av_push, but
> > probably not since you're generally pushing SVs just created
> > with newSV,
> > which sets the refcount to 1 to begin with. (Which is where
> > you want it if
> > you're pushing it onto an array)
>
>So this would also be true for av_store, right?  I.e., if I create a new SV
>(via newSVxv), and pass the pointer to it to av_store, I should leave the
>reference count at 1 as you describe, despite the fact that perlguts tells
>me to increment the reference count prior to the call (I guess in a sense I
>have already incremented the reference count by calling newSV, which
>incremented the count from 0 to 1).  Yes?

Pretty much, yes. Perlguts is correct if your SV has come from someplace 
besides newSV.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to