Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^4: where is sv_setrv?

by patcat88 (Deacon)
on Dec 20, 2011 at 16:49 UTC ( #944423=note: print w/ replies, xml ) Need Help??

in reply to Re^3: where is sv_setrv?
in thread where is sv_setrv?

There is a missing refcount inc on sv before "SvRV_set(rv, sv);".

You're saying that newSVrv causes referenced material to be destroyed permaturely. I don't believe you.

In newSVrv, a new target SV is created at sv.c#l9268 in perl.git. In a hypothetical setsv_rv you need to up the refcount of the EXISTING target SV that the reference will point to or the existing target SV will get garbage collected prematurely, and we arent making a weak reference here, or your following hv_store standard where the caller has to up the refcount (or do nothing with newSV) of the sv before passing to the func?

Comment on Re^4: where is sv_setrv?
Replies are listed 'Best First'.
Re^5: where is sv_setrv?
by ikegami (Pope) on Dec 20, 2011 at 21:27 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://944423]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2016-02-13 07:38 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (421 votes), past polls