Remove magic literal constant in favor of named constant
authorSteffen Mueller <smueller@cpan.org>
Tue, 11 Jun 2013 16:41:07 +0000 (18:41 +0200)
committerSteffen Mueller <smueller@cpan.org>
Tue, 11 Jun 2013 18:05:53 +0000 (20:05 +0200)
For clarity only

sv.c

diff --git a/sv.c b/sv.c
index 8222aae..d10e5a5 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1308,7 +1308,8 @@ Perl_sv_upgrade(pTHX_ SV *const sv, svtype new_type)
 #ifndef NODEFAULT_SHAREKEYS
            HvSHAREKEYS_on(sv);         /* key-sharing on by default */
 #endif
-           HvMAX(sv) = 7; /* (start with 8 buckets) */
+            /* start with PERL_HASH_DEFAULT_HvMAX+1 buckets: */
+           HvMAX(sv) = PERL_HASH_DEFAULT_HvMAX;
        }
 
        /* SVt_NULL isn't the only thing upgraded to AV or HV.