summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sv.h b/sv.h
index d90e85ea14..36fa72d749 100644
--- a/sv.h
+++ b/sv.h
@@ -80,8 +80,6 @@ struct io {
(Sv && ++SvREFCNT(Sv)), (SV*)Sv)
#define SvREFCNT_dec(sv) sv_free((SV*)sv)
#endif
-#define newRV_noinc(sv) ((Sv = newRV(sv)), \
- (--SvREFCNT(sv)), (SV*)Sv)
#define SVTYPEMASK 0xff
#define SvTYPE(sv) ((sv)->sv_flags & SVTYPEMASK)
@@ -549,6 +547,13 @@ I32 SvTRUE _((SV *));
#endif /* CRIPPLED_CC */
+#define newRV_inc(sv) newRV(sv)
+#ifdef CRIPPLED_CC
+SV *newRV_noinc _((SV *));
+#else
+#define newRV_noinc(sv) ((Sv = newRV(sv)), --SvREFCNT(SvRV(Sv)), Sv)
+#endif
+
/* the following macro updates any magic values this sv is associated with */
#define SvSETMAGIC(x) if (SvSMAGICAL(x)) mg_set(x)