Skip to content

Commit

Permalink
Clean up now streaming decoder used in most places
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn authored and zoffixznet committed May 26, 2017
1 parent 13a410a commit 148f4f2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/core/IO/Handle.pm
Expand Up @@ -97,13 +97,8 @@ my class IO::Handle {
}
else {
$!encoding = Rakudo::Internals.NORMALIZE_ENCODING($enc || 'utf-8');
# XXX Remove next two lines after streaming decoder is in use
nqp::setencoding($!PIO, $!encoding);
#?if !jvm
Rakudo::Internals.SET_LINE_ENDING_ON_HANDLE($!PIO, $!nl-in = $nl-in);
#?endif
$!decoder := Rakudo::Internals::VMBackedDecoder.new($!encoding);
$!decoder.set-line-separators($!nl-in.list);
$!decoder.set-line-separators(($!nl-in = $nl-in).list);
}
return self;
}
Expand Down Expand Up @@ -146,11 +141,8 @@ my class IO::Handle {
}
else {
$!encoding = Rakudo::Internals.NORMALIZE_ENCODING($enc || 'utf-8');
# XXX Remove next two lines after streaming decoder is in use
nqp::setencoding($!PIO, $!encoding);
Rakudo::Internals.SET_LINE_ENDING_ON_HANDLE($!PIO, $!nl-in = $nl-in);
$!decoder := Rakudo::Internals::VMBackedDecoder.new($!encoding);
$!decoder.set-line-separators($!nl-in.list);
$!decoder.set-line-separators(($!nl-in = $nl-in).list);
}
self;
}
Expand Down

0 comments on commit 148f4f2

Please sign in to comment.