Skip to content

Commit

Permalink
Be consistent about highexpect list type.
Browse files Browse the repository at this point in the history
Caught because NQP JVM is stricter, but the fix saves some boxing.
  • Loading branch information
jnthn committed Apr 29, 2013
1 parent 29aa7b4 commit 8a6eb77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QRegex/Cursor.nqp
Expand Up @@ -362,7 +362,7 @@ role NQPCursorRole is export {

method !fresh_highexpect() {
my @old := nqp::getattr($!shared, ParseShared, '@!highexpect');
nqp::bindattr($!shared, ParseShared, '@!highexpect', []);
nqp::bindattr($!shared, ParseShared, '@!highexpect', nqp::list_s());
@old
}

Expand Down Expand Up @@ -412,7 +412,7 @@ role NQPCursorRole is export {
method before($regex) {
my int $orig_highwater := nqp::getattr_i($!shared, ParseShared, '$!highwater');
my $orig_highexpect := nqp::getattr($!shared, ParseShared, '@!highexpect');
nqp::bindattr($!shared, ParseShared, '@!highexpect', []);
nqp::bindattr($!shared, ParseShared, '@!highexpect', nqp::list_s());
my $cur := self."!cursor_start_cur"();
nqp::bindattr_i($cur, $?CLASS, '$!pos', $!pos);
nqp::getattr_i($regex($cur), $?CLASS, '$!pos') >= 0 ??
Expand Down

0 comments on commit 8a6eb77

Please sign in to comment.