diff options
author | Andy Lester <andy@petdance.com> | 2005-10-04 10:16:05 -0500 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-10-05 15:34:09 +0000 |
commit | 44f8325f4c9b3aaf24b47f4da7dce3e8170dcf42 (patch) | |
tree | 79ae96444551bc3a112d7601282f544236b6cdfb /sv.c | |
parent | 5f0135ebccd6cdb2441aabb64baa39aea87199d3 (diff) | |
download | perl-44f8325f4c9b3aaf24b47f4da7dce3e8170dcf42.tar.gz |
Re: [PATCH] Random constings and printf cleanup
Message-ID: <20051004201605.GA31682@petdance.com>
p4raw-id: //depot/perl@25693
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -10174,27 +10174,27 @@ Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv) /* add a new entry to a pointer-mapping table */ void -Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, const void *oldv, void *newv) +Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, const void *oldsv, void *newsv) { PTR_TBL_ENT_t *tblent, **otblent; /* XXX this may be pessimal on platforms where pointers aren't good * hash values e.g. if they grow faster in the most significant * bits */ - const UV hash = PTR_TABLE_HASH(oldv); + const UV hash = PTR_TABLE_HASH(oldsv); bool empty = 1; assert(tbl); otblent = &tbl->tbl_ary[hash & tbl->tbl_max]; for (tblent = *otblent; tblent; empty=0, tblent = tblent->next) { - if (tblent->oldval == oldv) { - tblent->newval = newv; + if (tblent->oldval == oldsv) { + tblent->newval = newsv; return; } } new_body_inline(tblent, (void**)&PL_pte_arenaroot, (void**)&PL_pte_root, sizeof(struct ptr_tbl_ent)); - tblent->oldval = oldv; - tblent->newval = newv; + tblent->oldval = oldsv; + tblent->newval = newsv; tblent->next = *otblent; *otblent = tblent; tbl->tbl_items++; |