summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-06 18:38:45 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-06 18:38:45 +0000
commitb1135e3d40203a90e9ea126ad842db6295e76709 (patch)
tree0e0f6bbc5cf693bdc90065309e601e3da4f4a8ae /sv.c
parent605986241de3d828e4de2beec37dc9ecc5aaa260 (diff)
downloadperl-b1135e3d40203a90e9ea126ad842db6295e76709.tar.gz
Change types of PL_he_arenaroot and PL_pte_arenaroot to avoid casting.
p4raw-id: //depot/perl@24408
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/sv.c b/sv.c
index f1cffd020d..64eea01291 100644
--- a/sv.c
+++ b/sv.c
@@ -614,16 +614,24 @@ Perl_sv_free_arenas(pTHX)
PL_xpvbm_arenaroot = 0;
PL_xpvbm_root = 0;
- for (arena = (XPV*)PL_he_arenaroot; arena; arena = arenanext) {
- arenanext = (XPV*)arena->xpv_pv;
- Safefree(arena);
+ {
+ HE *he;
+ HE *he_next;
+ for (he = PL_he_arenaroot; he; he = he_next) {
+ he_next = HeNEXT(he);
+ Safefree(he);
+ }
}
PL_he_arenaroot = 0;
PL_he_root = 0;
- for (arena = (XPV*)PL_pte_arenaroot; arena; arena = arenanext) {
- arenanext = (XPV*)arena->xpv_pv;
- Safefree(arena);
+ {
+ struct ptr_tbl_ent *pte;
+ struct ptr_tbl_ent *pte_next;
+ for (pte = PL_pte_arenaroot; pte; pte = pte_next) {
+ pte_next = pte->next;
+ Safefree(pte);
+ }
}
PL_pte_arenaroot = 0;
PL_pte_root = 0;
@@ -10426,12 +10434,10 @@ S_more_pte(pTHX)
{
register struct ptr_tbl_ent* pte;
register struct ptr_tbl_ent* pteend;
- XPV *ptr;
- New(54, ptr, PERL_ARENA_SIZE/sizeof(XPV), XPV);
- ptr->xpv_pv = (char*)PL_pte_arenaroot;
+ New(0, ptr, PERL_ARENA_SIZE/sizeof(struct ptr_tbl_ent), struct ptr_tbl_ent);
+ ptr->next = PL_pte_arenaroot;
PL_pte_arenaroot = ptr;
- pte = (struct ptr_tbl_ent*)ptr;
pteend = &pte[PERL_ARENA_SIZE / sizeof(struct ptr_tbl_ent) - 1];
PL_pte_root = ++pte;
while (pte < pteend) {