Permalink
Browse files

fix compilatioin on current rakudo

  • Loading branch information...
moritz committed May 1, 2012
1 parent 6a906cf commit c32957fc8cfb1d7e5eda7d8a68a84e1416d05d46
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/String/CRC32.pm
View
@@ -39,7 +39,8 @@ my @CRC_TABLE =
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d;
-our multi sub crc32 (Str $s) {
+our proto sub crc32($) {*}
+multi sub crc32 (Str $s) {
my $crcinit = 0;
my $crc = $crcinit +^ 0xFFFFFFFF;
@@ -53,12 +54,12 @@ our multi sub crc32 (Str $s) {
return $crc;
}
-our multi sub crc32 (Buf $b) {
+multi sub crc32 (Buf $b) {
my Str $s = $b.decode('UTF-8');
return crc32($s);
}
-our multi sub crc32 (IO $fh) {
+multi sub crc32 (IO $fh) {
my Str $s = $fh.slurp();
return crc32($s);
}

0 comments on commit c32957f

Please sign in to comment.