File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ __UNDEFINED__
76
76
# endif
77
77
#endif
78
78
79
+ /* not as efficient as the real thing, but it works */
80
+ __UNDEFINED__ SvREFCNT_dec_NN(sv) SvREFCNT_dec(sv)
81
+
79
82
__UNDEFINED__ SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
80
83
__UNDEFINED__ SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
81
84
__UNDEFINED__ SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
@@ -110,13 +113,15 @@ SvREFCNT()
110
113
mXPUSHi(SvREFCNT(sv) == 8);
111
114
SvREFCNT_inc_simple_void_NN(sv);
112
115
mXPUSHi(SvREFCNT(sv) == 9);
116
+ SvREFCNT_dec_NN(sv);
117
+ mXPUSHi(SvREFCNT(sv) == 8);
113
118
while (SvREFCNT(sv) > 1)
114
119
SvREFCNT_dec(sv);
115
120
mXPUSHi(SvREFCNT(sv) == 1);
116
121
SvREFCNT_dec(sv);
117
- XSRETURN(14 );
122
+ XSRETURN(15 );
118
123
119
- =tests plan => 14
124
+ =tests plan => 15
120
125
121
126
for (Devel::PPPort::SvREFCNT()) {
122
127
ok(defined $_ and $_);
Original file line number Diff line number Diff line change 14
14
#ifndef sv_dup_inc
15
15
# define sv_dup_inc (s ,t ) SvREFCNT_inc(sv_dup(s,t))
16
16
#endif
17
- #ifndef SvREFCNT_dec_NN
18
- # define SvREFCNT_dec_NN (x ) SvREFCNT_dec(x)
19
- #endif
20
17
#ifndef PERL_UNUSED_RESULT
21
18
# if defined(__GNUC__ ) && defined(HASATTRIBUTE_WARN_UNUSED_RESULT )
22
19
# define PERL_UNUSED_RESULT (v ) STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END
You can’t perform that action at this time.
0 commit comments