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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||