From: Stephen McCamant Date: Sat, 27 Jun 1998 16:38:19 +0000 (-0500) Subject: IV changes for long long (was Re: 5.004_68 on its way to the CPAN) X-Git-Tag: accepted/trunk/20130322.191538~37541 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea7c11a37de2088ba174a077e567a01d0e73d0ca;p=platform%2Fupstream%2Fperl.git IV changes for long long (was Re: 5.004_68 on its way to the CPAN) Message-Id: p4raw-id: //depot/perl@1253 --- diff --git a/perlvars.h b/perlvars.h index 6b16279..115ec5a 100644 --- a/perlvars.h +++ b/perlvars.h @@ -60,7 +60,7 @@ PERLVARI(Gsh_path, char *, SH_PATH)/* full path of shell */ PERLVAR(Gsighandlerp, Sighandler_t) PERLVAR(Gxiv_arenaroot, XPV*) /* list of allocated xiv areas */ -PERLVAR(Gxiv_root, IV **) /* free xiv list--shared by interpreters */ +PERLVAR(Gxiv_root, IV *) /* free xiv list--shared by interpreters */ PERLVAR(Gxnv_root, double *) /* free xnv list--shared by interpreters */ PERLVAR(Gxrv_root, XRV *) /* free xrv list--shared by interpreters */ PERLVAR(Gxpv_root, XPV *) /* free xpv list--shared by interpreters */ diff --git a/sv.c b/sv.c index 1e5af08..8b0ce6d 100644 --- a/sv.c +++ b/sv.c @@ -416,13 +416,13 @@ sv_free_arenas(void) STATIC XPVIV* new_xiv(void) { - IV** xiv; + IV* xiv; if (xiv_root) { xiv = xiv_root; /* * See comment in more_xiv() -- RAM. */ - xiv_root = (IV**)*xiv; + xiv_root = *(IV**)xiv; return (XPVIV*)((char*)xiv - sizeof(XPV)); } return more_xiv(); @@ -431,30 +431,30 @@ new_xiv(void) STATIC void del_xiv(XPVIV *p) { - IV** xiv = (IV**)((char*)(p) + sizeof(XPV)); - *xiv = (IV *)xiv_root; + IV* xiv = (IV*)((char*)(p) + sizeof(XPV)); + *(IV**)xiv = xiv_root; xiv_root = xiv; } STATIC XPVIV* more_xiv(void) { - register IV** xiv; - register IV** xivend; + register IV* xiv; + register IV* xivend; XPV* ptr; New(705, ptr, 1008/sizeof(XPV), XPV); ptr->xpv_pv = (char*)xiv_arenaroot; /* linked list of xiv arenas */ xiv_arenaroot = ptr; /* to keep Purify happy */ - xiv = (IV**) ptr; - xivend = &xiv[1008 / sizeof(IV *) - 1]; - xiv += (sizeof(XPV) - 1) / sizeof(IV *) + 1; /* fudge by size of XPV */ + xiv = (IV*) ptr; + xivend = &xiv[1008 / sizeof(IV) - 1]; + xiv += (sizeof(XPV) - 1) / sizeof(IV) + 1; /* fudge by size of XPV */ xiv_root = xiv; while (xiv < xivend) { - *xiv = (IV *)(xiv + 1); + *(IV**)xiv = (IV *)(xiv + 1); xiv++; } - *xiv = 0; + *(IV**)xiv = 0; return new_xiv(); }