Fix spelling errors in comments.
authorNicholas Clark <nick@ccl4.org>
Mon, 17 Sep 2007 22:34:45 +0000 (22:34 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 17 Sep 2007 22:34:45 +0000 (22:34 +0000)
p4raw-id: //depot/perl@31890

ext/Hash/Util/FieldHash/t/10_hash.t
t/op/hash.t

index 5c56675..29c2f4d 100644 (file)
@@ -36,7 +36,7 @@ ok (Internals::HvREHASH(%h), "20 entries triggers rehash");
 
 
 # second part using an emulation of the PERL_HASH in perl, mounting an
-# attack on a prepopulated hash. This is also useful if you need normal
+# attack on a pre-populated hash. This is also useful if you need normal
 # keys which don't contain \0 -- suitable for stashes
 
 use constant MASK_U32  => 2**32;
@@ -49,12 +49,12 @@ fieldhash my %h2;
 %h2 = map {$_ => 1} 'a'..'cc';
 
 ok (!Internals::HvREHASH(%h2), 
-    "starting with pre-populated non-pathalogical hash (rehash flag if off)");
+    "starting with pre-populated non-pathological hash (rehash flag if off)");
 
 my @keys = get_keys(\%h2);
 $h2{$_}++ for @keys;
 ok (Internals::HvREHASH(%h2), 
-    scalar(@keys) . " colliding into the same bucket keys are triggerring rehash");
+    scalar(@keys) . " colliding into the same bucket keys are triggering rehash");
 
 sub get_keys {
     my $hr = shift;
@@ -104,7 +104,7 @@ sub hash {
     for (@c) {
         # (A % M) + (B % M) == (A + B) % M
         # This works because '+' produces a NV, which is big enough to hold
-        # the intermidiate result. We only need the % before any "^" and "&"
+        # the intermediate result. We only need the % before any "^" and "&"
         # to get the result in the range for an I32.
         # and << doesn't work on NV, so using 1 << 10
         $u += ord;
index 15a336e..6e1b4da 100644 (file)
@@ -30,7 +30,7 @@ ok (Internals::HvREHASH(%h), "20 entries triggers rehash");
 
 
 # second part using an emulation of the PERL_HASH in perl, mounting an
-# attack on a prepopulated hash. This is also useful if you need normal
+# attack on a pre-populated hash. This is also useful if you need normal
 # keys which don't contain \0 -- suitable for stashes
 
 use constant MASK_U32  => 2**32;
@@ -42,12 +42,12 @@ use constant START     => "a";
 my %h2 = map {$_ => 1} 'a'..'cc';
 
 ok (!Internals::HvREHASH(%h2), 
-    "starting with pre-populated non-pathalogical hash (rehash flag if off)");
+    "starting with pre-populated non-pathological hash (rehash flag if off)");
 
 my @keys = get_keys(\%h2);
 $h2{$_}++ for @keys;
 ok (Internals::HvREHASH(%h2), 
-    scalar(@keys) . " colliding into the same bucket keys are triggerring rehash");
+    scalar(@keys) . " colliding into the same bucket keys are triggering rehash");
 
 sub get_keys {
     my $hr = shift;
@@ -97,7 +97,7 @@ sub hash {
     for (@c) {
         # (A % M) + (B % M) == (A + B) % M
         # This works because '+' produces a NV, which is big enough to hold
-        # the intermidiate result. We only need the % before any "^" and "&"
+        # the intermediate result. We only need the % before any "^" and "&"
         # to get the result in the range for an I32.
         # and << doesn't work on NV, so using 1 << 10
         $u += ord;