POD typo.
[p5sagit/p5-mst-13.2.git] / sv.h
diff --git a/sv.h b/sv.h
index 9fe3657..90c62aa 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, by Larry Wall and others
+ *    2000, 2001, 2002, 2003, 2004, 2005 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.
@@ -68,6 +68,13 @@ struct STRUCT_SV {           /* struct sv { */
     void*      sv_any;         /* pointer to something */
     U32                sv_refcnt;      /* how many references to us */
     U32                sv_flags;       /* what we are */
+#ifdef DEBUG_LEAKING_SCALARS
+    unsigned   sv_debug_optype:9;      /* the type of OP that allocated us */
+    unsigned   sv_debug_inpad:1;       /* was allocated in a pad for an OP */
+    unsigned   sv_debug_cloned:1;      /* was cloned for an ithread */
+    unsigned   sv_debug_line:16;       /* the line where we were allocated */
+    char *     sv_debug_file;          /* the file where we were allocated */
+#endif
 };
 
 struct gv {
@@ -729,18 +736,25 @@ in gv.h: */
 #define SvRV(sv) ((XRV*)  SvANY(sv))->xrv_rv
 #define SvRVx(sv) SvRV(sv)
 
+#ifdef PERL_DEBUG_COW
+#define SvIVX(sv) (0 + ((XPVIV*)  SvANY(sv))->xiv_iv)
+#define SvUVX(sv) ((XPVUV*)  SvANY(sv))->xuv_uv
+#define SvNVX(sv) (0.0 + ((XPVNV*)SvANY(sv))->xnv_nv)
+#else
 #define SvIVX(sv) ((XPVIV*)  SvANY(sv))->xiv_iv
-#define SvIVXx(sv) SvIVX(sv)
 #define SvUVX(sv) ((XPVUV*)  SvANY(sv))->xuv_uv
-#define SvUVXx(sv) SvUVX(sv)
-#define SvNVX(sv)  ((XPVNV*)SvANY(sv))->xnv_nv
-#define SvNVXx(sv) SvNVX(sv)
+#define SvNVX(sv) ((XPVNV*)SvANY(sv))->xnv_nv
+#endif
 #define SvPVX(sv)  ((XPV*)  SvANY(sv))->xpv_pv
-#define SvPVXx(sv) SvPVX(sv)
 #define SvCUR(sv) ((XPV*)  SvANY(sv))->xpv_cur
 #define SvLEN(sv) ((XPV*)  SvANY(sv))->xpv_len
-#define SvLENx(sv) SvLEN(sv)
 #define SvEND(sv)(((XPV*)  SvANY(sv))->xpv_pv + ((XPV*)SvANY(sv))->xpv_cur)
+
+#define SvIVXx(sv) SvIVX(sv)
+#define SvUVXx(sv) SvUVX(sv)
+#define SvNVXx(sv) SvNVX(sv)
+#define SvPVXx(sv) SvPVX(sv)
+#define SvLENx(sv) SvLEN(sv)
 #define SvENDx(sv) ((PL_Sv = (sv)), SvEND(PL_Sv))
 
 #ifdef DEBUGGING
@@ -759,10 +773,10 @@ in gv.h: */
                (void) SvIV(sv); } STMT_END
 #define SvIV_set(sv, val) \
        STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
-               (SvIVX(sv) = (val)); } STMT_END
+               (((XPVIV*)  SvANY(sv))->xiv_iv = (val)); } STMT_END
 #define SvNV_set(sv, val) \
        STMT_START { assert(SvTYPE(sv) == SVt_NV || SvTYPE(sv) >= SVt_PVNV); \
-               (SvNVX(sv) = (val)); } STMT_END
+               (((XPVNV*)SvANY(sv))->xnv_nv = (val)); } STMT_END
 #define SvPV_set(sv, val) \
        STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
                (SvPVX(sv) = (val)); } STMT_END