summaryrefslogtreecommitdiff
path: root/ext/Encode
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2004-02-23 01:09:33 +0900
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-23 19:15:53 +0000
commit90f5826e78891b7633d6b153f416059ce7d36f9e (patch)
tree8a2e8b752e33f9f0850e9aa9d87122acb62ab9a2 /ext/Encode
parent33e4b5a9a1796aefffe3aa9613e9ae84909ceb74 (diff)
downloadperl-90f5826e78891b7633d6b153f416059ce7d36f9e.tar.gz
Re: [perl #26905] "use bytes" doesn't apply byte semantics to concatenation
Date: Sun, 22 Feb 2004 16:09:33 +0900 Message-Id: <20040222160505.98E5.BQW10602@nifty.com> Subject: [PATCH] Encode::CN::HZ (was Re: [perl #26905] "use bytes" doesn't apply byte semantics to concatenation) From: SADAHIRO Tomoyuki <bqw10602@nifty.com> Date: Sun, 22 Feb 2004 18:41:43 +0900 Message-Id: <20040222182357.6B39.BQW10602@nifty.com> Plus, add a "_01" to the theoretical version number of Encode::CN::HZ. p4raw-id: //depot/perl@22363
Diffstat (limited to 'ext/Encode')
-rw-r--r--ext/Encode/lib/Encode/CN/HZ.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/Encode/lib/Encode/CN/HZ.pm b/ext/Encode/lib/Encode/CN/HZ.pm
index 1ea1e45f67..02c764cd13 100644
--- a/ext/Encode/lib/Encode/CN/HZ.pm
+++ b/ext/Encode/lib/Encode/CN/HZ.pm
@@ -3,7 +3,8 @@ package Encode::CN::HZ;
use strict;
use vars qw($VERSION);
-$VERSION = do { my @r = (q$Revision: 1.5 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+#$VERSION = do { my @r = (q$Revision: 1.5 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+$VERSION = 1.05_01;
use Encode qw(:fallbacks);
@@ -17,11 +18,8 @@ __PACKAGE__->Define('hz');
sub needs_lines { 1 }
-sub perlio_ok { 1 }
-
sub decode ($$;$)
{
- use bytes;
my ($obj,$str,$chk) = @_;
my $GB = Encode::find_encoding('gb2312-raw');
@@ -59,13 +57,11 @@ sub decode ($$;$)
}
}
}
- $_[1] = $str if $chk;
+ $_[1] = '' if $chk; # needs_lines guarantees no partial character
return $ret;
}
sub cat_decode {
- use bytes;
-
my ($obj, undef, $src, $pos, $trm, $chk) = @_;
my ($rdst, $rsrc, $rpos) = \@_[1..3];