summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-18 12:39:40 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-21 16:38:35 -0700
commit75e16a44f58a9b54834e043a988a36289179c4ab (patch)
treead35a88c8217932de9e4f629278459cb0da6b778 /sv.h
parent27669aa412f62d9967b069ba672cd20239c354c1 (diff)
downloadperl-75e16a44f58a9b54834e043a988a36289179c4ab.tar.gz
Use fast SvREFCNT_dec for non-GCC
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/sv.h b/sv.h
index 970d03e85d..ab0a0fdb62 100644
--- a/sv.h
+++ b/sv.h
@@ -235,22 +235,7 @@ perform the upgrade if necessary. See C<svtype>.
#define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT(MUTABLE_SV(sv)))
#define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT(MUTABLE_SV(sv)))
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
-# define SvREFCNT_dec(sv) \
- ({ \
- SV * const _sv = MUTABLE_SV(sv); \
- if (_sv) { \
- if (SvREFCNT(_sv)) { \
- if (--(SvREFCNT(_sv)) == 0) \
- Perl_sv_free2(aTHX_ _sv); \
- } else { \
- sv_free(_sv); \
- } \
- } \
- })
-#else
-#define SvREFCNT_dec(sv) sv_free(MUTABLE_SV(sv))
-#endif
+#define SvREFCNT_dec(sv) S_SvREFCNT_dec(aTHX_ MUTABLE_SV(sv))
#define SVTYPEMASK 0xff
#define SvTYPE(sv) ((svtype)((sv)->sv_flags & SVTYPEMASK))