hax/sv_setrv.c.inc | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 4 | 4 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | n/a | ||
pod | n/a | ||
total | 4 | 4 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | /* vi: set ft=c : */ | ||||||
2 | |||||||
3 | #ifndef sv_setrv_noinc | ||||||
4 | # define sv_setrv_noinc(sv, rv) S_sv_setrv(aTHX_ sv, rv) | ||||||
5 | # define sv_setrv_inc(sv, rv) S_sv_setrv(aTHX_ sv, SvREFCNT_inc(rv)) | ||||||
6 | #endif | ||||||
7 | |||||||
8 | 2 | static void S_sv_setrv(pTHX_ SV *sv, SV *rv) | |||||
9 | { | ||||||
10 | 2 | SV *tmp = newRV_noinc(rv); | |||||
11 | 2 | sv_setsv(sv, tmp); | |||||
12 | SvREFCNT_dec(tmp); | ||||||
13 | 2 | } |