[inseparable changes from patch from perl5.003_12 to perl5.003_13]
[p5sagit/p5-mst-13.2.git] / sv.h
diff --git a/sv.h b/sv.h
index 06bf356..36fa72d 100644 (file)
--- 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)
@@ -557,6 +562,8 @@ I32 SvTRUE _((SV *));
 
 #define SvPEEK(sv) sv_peek(sv)
 
+#define SvIMMORTAL(sv) ((sv)==&sv_undef || (sv)==&sv_yes || (sv)==&sv_no)
+
 #define isGV(sv) (SvTYPE(sv) == SVt_PVGV)
 
 #ifndef DOSISH