summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-06-22 04:41:00 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-23 08:39:44 +0000
commit1b6737cc10a847650f574c35f419cbd680a5a5ef (patch)
treeb96d16d5faf3db00f9c9488a814c8a8d6a217387 /hv.c
parent89e33a0587050e7ef2e88ba45c87444d8506f821 (diff)
downloadperl-1b6737cc10a847650f574c35f419cbd680a5a5ef.tar.gz
Const Boy II: The Localizing
Message-ID: <20050622144059.GA19598@petdance.com> p4raw-id: //depot/perl@24945
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hv.c b/hv.c
index eb2a1a5aa7..b3c6b2f33d 100644
--- a/hv.c
+++ b/hv.c
@@ -171,7 +171,7 @@ Perl_he_dup(pTHX_ HE *e, bool shared, CLONE_PARAMS* param)
else if (shared) {
/* This is hek_dup inlined, which seems to be important for speed
reasons. */
- HEK *source = HeKEY_hek(e);
+ HEK * const source = HeKEY_hek(e);
HEK *shared = (HEK*)ptr_table_fetch(PL_ptr_table, source);
if (shared) {
@@ -198,7 +198,7 @@ static void
S_hv_notallowed(pTHX_ int flags, const char *key, I32 klen,
const char *msg)
{
- SV *sv = sv_newmortal();
+ SV * const sv = sv_newmortal();
if (!(flags & HVhek_FREEKEY)) {
sv_setpvn(sv, key, klen);
}
@@ -2309,7 +2309,6 @@ Perl_share_hek(pTHX_ const char *str, I32 len, register U32 hash)
STATIC HEK *
S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
{
- register XPVHV* xhv;
register HE *entry;
register HE **oentry;
I32 found = 0;
@@ -2323,7 +2322,7 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
Can't rehash the shared string table, so not sure if it's worth
counting the number of entries in the linked list
*/
- xhv = (XPVHV*)SvANY(PL_strtab);
+ register XPVHV * const xhv = (XPVHV*)SvANY(PL_strtab);
/* assert(xhv_array != 0) */
LOCK_STRTAB_MUTEX;
oentry = &(HvARRAY(PL_strtab))[hash & (I32) HvMAX(PL_strtab)];