Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use native int iterator variable in Array.REIFY
  • Loading branch information
moritz committed Apr 22, 2012
1 parent a527e09 commit 80f140f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/Array.pm
Expand Up @@ -75,9 +75,10 @@ class Array {
method REIFY(Parcel \$parcel) {
my Mu $rpa := nqp::getattr($parcel, Parcel, '$!storage');
my Mu $iter := nqp::iterator($rpa);
my $i = 0;
my int $i = 0;
while $iter {
nqp::bindpos($rpa, nqp::unbox_i($i++), my $v = nqp::shift($iter));
nqp::bindpos($rpa, $i, my $v = nqp::shift($iter));
$i = $i + 1;
}
pir::find_method__PPs(List, 'REIFY')(self, $parcel)
}
Expand Down

0 comments on commit 80f140f

Please sign in to comment.