This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change 24886 was buggy - should be taking (and passing in) the
authorNicholas Clark <nick@ccl4.org>
Fri, 17 Jun 2005 17:30:19 +0000 (17:30 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 17 Jun 2005 17:30:19 +0000 (17:30 +0000)
address of the arena.

p4raw-id: //depot/perl@24890

sv.c

diff --git a/sv.c b/sv.c
index a14026d..66094a2 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1333,7 +1333,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
     NV         nv;
     MAGIC*     magic;
     HV*                stash;
     NV         nv;
     MAGIC*     magic;
     HV*                stash;
-    void*      old_body_arena;
+    void**     old_body_arena;
     size_t     old_body_offset;
     size_t     old_body_length;        /* Well, the length to copy.  */
     void*      old_body;
     size_t     old_body_offset;
     size_t     old_body_length;        /* Well, the length to copy.  */
     void*      old_body;
@@ -1380,7 +1380,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
        break;
     case SVt_NV:
        nv      = SvNVX(sv);
        break;
     case SVt_NV:
        nv      = SvNVX(sv);
-       old_body_arena = PL_xnv_root;
+       old_body_arena = (void **) &PL_xnv_root;
        old_body_length = sizeof(NV);
        zero_nv = FALSE;
 
        old_body_length = sizeof(NV);
        zero_nv = FALSE;
 
@@ -1394,7 +1394,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
        pv      = SvPVX_mutable(sv);
        cur     = SvCUR(sv);
        len     = SvLEN(sv);
        pv      = SvPVX_mutable(sv);
        cur     = SvCUR(sv);
        len     = SvLEN(sv);
-       old_body_arena = PL_xpv_root;
+       old_body_arena = (void **) &PL_xpv_root;
        old_body_offset = STRUCT_OFFSET(XPV, xpv_cur)
            - STRUCT_OFFSET(xpv_allocated, xpv_cur);
        old_body_length = sizeof(XPV) - old_body_offset;
        old_body_offset = STRUCT_OFFSET(XPV, xpv_cur)
            - STRUCT_OFFSET(xpv_allocated, xpv_cur);
        old_body_length = sizeof(XPV) - old_body_offset;
@@ -1408,7 +1408,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
        cur     = SvCUR(sv);
        len     = SvLEN(sv);
        iv      = SvIVX(sv);
        cur     = SvCUR(sv);
        len     = SvLEN(sv);
        iv      = SvIVX(sv);
-       old_body_arena = PL_xpviv_root;
+       old_body_arena = (void **) &PL_xpviv_root;
        old_body_offset = STRUCT_OFFSET(XPVIV, xpv_cur)
            - STRUCT_OFFSET(xpviv_allocated, xpv_cur);
        old_body_length = sizeof(XPVIV) - old_body_offset;
        old_body_offset = STRUCT_OFFSET(XPVIV, xpv_cur)
            - STRUCT_OFFSET(xpviv_allocated, xpv_cur);
        old_body_length = sizeof(XPVIV) - old_body_offset;
@@ -1419,7 +1419,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
        len     = SvLEN(sv);
        iv      = SvIVX(sv);
        nv      = SvNVX(sv);
        len     = SvLEN(sv);
        iv      = SvIVX(sv);
        nv      = SvNVX(sv);
-       old_body_arena = PL_xpvnv_root;
+       old_body_arena = (void **) &PL_xpvnv_root;
        old_body_length = sizeof(XPVNV);
        zero_nv = FALSE;
        break;
        old_body_length = sizeof(XPVNV);
        zero_nv = FALSE;
        break;
@@ -1439,7 +1439,7 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
        nv      = SvNVX(sv);
        magic   = SvMAGIC(sv);
        stash   = SvSTASH(sv);
        nv      = SvNVX(sv);
        magic   = SvMAGIC(sv);
        stash   = SvSTASH(sv);
-       old_body_arena = PL_xpvmg_root;
+       old_body_arena = (void **) &PL_xpvmg_root;
        old_body_length = sizeof(XPVMG);
        zero_nv = FALSE;
        break;
        old_body_length = sizeof(XPVMG);
        zero_nv = FALSE;
        break;