diff --git a/dist/Devel-PPPort/parts/inc/SvREFCNT b/dist/Devel-PPPort/parts/inc/SvREFCNT index 422aa58ac86e..ee8f2aceaec3 100644 --- a/dist/Devel-PPPort/parts/inc/SvREFCNT +++ b/dist/Devel-PPPort/parts/inc/SvREFCNT @@ -76,6 +76,9 @@ __UNDEFINED__ # endif #endif +/* not as efficient as the real thing, but it works */ +__UNDEFINED__ SvREFCNT_dec_NN(sv) SvREFCNT_dec(sv) + __UNDEFINED__ SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END __UNDEFINED__ SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv)) __UNDEFINED__ SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) @@ -110,13 +113,15 @@ SvREFCNT() mXPUSHi(SvREFCNT(sv) == 8); SvREFCNT_inc_simple_void_NN(sv); mXPUSHi(SvREFCNT(sv) == 9); + SvREFCNT_dec_NN(sv); + mXPUSHi(SvREFCNT(sv) == 8); while (SvREFCNT(sv) > 1) SvREFCNT_dec(sv); mXPUSHi(SvREFCNT(sv) == 1); SvREFCNT_dec(sv); - XSRETURN(14); + XSRETURN(15); -=tests plan => 14 +=tests plan => 15 for (Devel::PPPort::SvREFCNT()) { ok(defined $_ and $_); diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs index ba53843f77d0..f98f06b40922 100644 --- a/dist/threads/threads.xs +++ b/dist/threads/threads.xs @@ -14,9 +14,6 @@ #ifndef sv_dup_inc # define sv_dup_inc(s,t) SvREFCNT_inc(sv_dup(s,t)) #endif -#ifndef SvREFCNT_dec_NN -# define SvREFCNT_dec_NN(x) SvREFCNT_dec(x) -#endif #ifndef PERL_UNUSED_RESULT # if defined(__GNUC__) && defined(HASATTRIBUTE_WARN_UNUSED_RESULT) # define PERL_UNUSED_RESULT(v) STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END