new_body_type doesn't need to subtract the offset, that's what
[p5sagit/p5-mst-13.2.git] / sv.h
diff --git a/sv.h b/sv.h
index a40d3b5..89b4a9e 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1,7 +1,7 @@
 /*    sv.h
  *
  *    Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- *    2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -66,6 +66,9 @@ typedef enum {
 #ifdef PERL_IN_SV_C
 #define PTE_SVSLOT     SVt_RV
 #endif
+#if defined(PERL_IN_HV_C) || defined(PERL_IN_XS_APITEST)
+#define HE_SVSLOT      SVt_NULL
+#endif
 
 /* typedefs to eliminate some typing */
 typedef struct he HE;
@@ -113,7 +116,7 @@ struct cv {
 };
 
 struct av {
-    _SV_HEAD(XPVAV*);          /* pointer to xpvcv body */
+    _SV_HEAD(XPVAV*);          /* pointer to xpvav body */
     _SV_HEAD_UNION;
 };
 
@@ -128,7 +131,7 @@ struct io {
 };
 
 #undef _SV_HEAD
-#undef _SV_HEAD_UNION          /* insure no pollution */
+#undef _SV_HEAD_UNION          /* ensure no pollution */
 
 /*
 =head1 SV Manipulation Functions
@@ -166,7 +169,7 @@ perform the upgrade if necessary.  See C<svtype>.
     })
 #else
 #  define SvREFCNT_inc(sv)     \
-       ((PL_Sv=(SV*)(sv)), (PL_Sv && ++(SvREFCNT(PL_Sv))), (SV*)PL_Sv)
+       ((PL_Sv=(SV*)(sv)) ? ((++(SvREFCNT(PL_Sv))),(PL_Sv)) : NULL)
 #endif
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(PERL_GCC_PEDANTIC)
@@ -748,7 +751,8 @@ in gv.h: */
                                                  SVf_IVisUV),          \
                                    SvFLAGS(sv) |= (SVf_POK|SVp_POK))
 
-#define SvVOK(sv)              (SvMAGICAL(sv) && mg_find(sv,'V'))
+#define SvVOK(sv)              (SvMAGICAL(sv)                          \
+                                ? mg_find(sv,PERL_MAGIC_vstring) : NULL)
 #define SvOOK(sv)              (SvFLAGS(sv) & SVf_OOK)
 #define SvOOK_on(sv)           ((void)SvIOK_off(sv), SvFLAGS(sv) |= SVf_OOK)
 #define SvOOK_off(sv)          ((void)(SvOOK(sv) && sv_backoff(sv)))
@@ -1050,7 +1054,7 @@ Taints an SV if tainting is enabled.
 =cut
 */
 
-#define sv_taint(sv)     sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0)
+#define sv_taint(sv)     sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0)
 
 #define SvTAINTED(sv)    (SvMAGICAL(sv) && sv_tainted(sv))
 #define SvTAINTED_on(sv)  STMT_START{ if(PL_tainting){sv_taint(sv);}   }STMT_END