Reorder the union to cause Win32 compilers to use void * alignment for
authorNicholas Clark <nick@ccl4.org>
Tue, 24 May 2005 17:13:34 +0000 (17:13 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 24 May 2005 17:13:34 +0000 (17:13 +0000)
it.

p4raw-id: //depot/perl@24569

av.h
cv.h
hv.h
sv.h

diff --git a/av.h b/av.h
index 05e09c5..a1f0259 100644 (file)
--- a/av.h
+++ b/av.h
@@ -13,7 +13,6 @@ struct xpvav {
     SSize_t    xav_fill;       /* Index of last element present */
     SSize_t    xav_max;        /* max index for which array has space */
     union {
-       NV      xnvu_nv;
        struct {
            void *xnv_p1;       /* pointer to beginning of C array of SVs */
            union {
@@ -21,6 +20,7 @@ struct xpvav {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;
     }          xnv_u;
     MAGIC*     xmg_magic;      /* magic for scalar array */
     HV*                xmg_stash;      /* class package */
diff --git a/cv.h b/cv.h
index 4f9fb94..ba8364b 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -16,7 +16,6 @@ struct xpvcv {
     STRLEN     xpv_cur;        /* length of xp_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -24,6 +23,7 @@ struct xpvcv {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* magic for scalar array */
     HV*                xmg_stash;      /* class package */
diff --git a/hv.h b/hv.h
index 0d1f975..ddbdd80 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -46,7 +46,6 @@ struct xpvhv {
     STRLEN     xhv_fill;       /* how full xhv_array currently is */
     STRLEN     xhv_max;        /* subscript of last element of xhv_array */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -54,6 +53,7 @@ struct xpvhv {
                IV xnv_i2;      /* how many elements in the array */
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
     MAGIC*     xmg_magic;      /* magic for scalar array */
     HV*                xmg_stash;      /* class package */
diff --git a/sv.h b/sv.h
index 2fb5f4d..69aad46 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -306,7 +306,6 @@ struct xpvnv {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -314,6 +313,7 @@ struct xpvnv {
                IV xnv_i2;
            }   xnv_u2;
        }       xnv_s;
+       NV      xnvu_nv;        /* numeric value, if any */
     }          xnv_u;
 };
 
@@ -325,7 +325,6 @@ struct xpvmg {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -333,6 +332,7 @@ 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 */
@@ -343,7 +343,6 @@ struct xpvlv {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -351,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 */
@@ -374,7 +374,6 @@ struct xpvgv {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -382,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 */
@@ -398,7 +398,6 @@ struct xpvbm {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -406,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 */
@@ -424,7 +424,6 @@ struct xpvfm {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -432,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 */
@@ -458,7 +458,6 @@ struct xpvio {
     STRLEN     xpv_cur;        /* length of sv_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     union {
-       NV      xnvu_nv;        /* numeric value, if any */
        struct {
            void *xnv_p1;
            union {
@@ -466,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 */