This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bytes.pm doesn't check undefined subroutine calling
[perl5.git] / sv.h
diff --git a/sv.h b/sv.h
index 5f4a262..69aad46 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -275,28 +275,37 @@ perform the upgrade if necessary.  See C<svtype>.
 #define SVpav_REIFY    0x80000000      /* can become real */
 
 struct xpv {
+    IV         xpv_dummy;      /* This isn't allocated. */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
 };
 
-struct xpviv {
+#if 0
+typedef struct xpv xpv_allocated;
+#else
+typedef struct {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
+} xpv_allocated;
+#endif
+
+struct xpviv {
     IV         xiv_iv;         /* integer value or pv offset */
+    STRLEN     xpv_cur;        /* length of sv_pv as a C string */
+    STRLEN     xpv_len;        /* allocated size */
 };
 
 struct xpvuv {
+    UV         xuv_uv;         /* unsigned value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    UV         xuv_uv;         /* unsigned value or pv offset */
 };
 
 struct xpvnv {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -304,6 +313,7 @@ struct xpvnv {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
 };
 
@@ -311,11 +321,10 @@ struct xpvnv {
 
 /* These structure must match the beginning of struct xpvhv in hv.h. */
 struct xpvmg {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -323,17 +332,17 @@ struct xpvmg {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* linked list of magicalness */
     HV*                xmg_stash;      /* class package */
 };
 
 struct xpvlv {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -341,6 +350,7 @@ struct xpvlv {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* linked list of magicalness */
     HV*                xmg_stash;      /* class package */
@@ -360,11 +370,10 @@ struct xpvlv {
 };
 
 struct xpvgv {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -372,6 +381,7 @@ struct xpvgv {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* linked list of magicalness */
     HV*                xmg_stash;      /* class package */
@@ -384,11 +394,10 @@ struct xpvgv {
 };
 
 struct xpvbm {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -396,6 +405,7 @@ struct xpvbm {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* linked list of magicalness */
     HV*                xmg_stash;      /* class package */
@@ -410,11 +420,10 @@ struct xpvbm {
 typedef U16 cv_flags_t;
 
 struct xpvfm {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -422,6 +431,7 @@ struct xpvfm {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* linked list of magicalness */
     HV*                xmg_stash;      /* class package */
@@ -444,11 +454,10 @@ struct xpvfm {
 };
 
 struct xpvio {
+    IV         xiv_iv;         /* integer value or pv offset */
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
-    IV         xiv_iv;         /* integer value or pv offset */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -456,6 +465,7 @@ struct xpvio {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* linked list of magicalness */
     HV*                xmg_stash;      /* class package */
@@ -1487,3 +1497,13 @@ struct clone_params {
   UV  flags;
   PerlInterpreter *proto_perl;
 };
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */