summaryrefslogtreecommitdiff
path: root/tool/transcode-tblgen.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-12 07:20:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-12 07:20:10 +0000
commit5ade93542fd9ee1a11515a2fa885f2cf822833d2 (patch)
treed018515fd1e7ab74c31c71468ce9cec350400ed1 /tool/transcode-tblgen.rb
parent47c8401c5a3196b8e7ab65bce2cdad14edf6c08d (diff)
* transcode_data.h (TRANSCODE_ERROR): removed.
* tool/transcode-tblgen.rb: 8bit byte of ASCII-8BIT is a valid (but unique to ASCII-8BIT) character. * transcode.c (rb_eConversionUndefined): new error. (rb_eInvalidByteSequence): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/transcode-tblgen.rb')
-rw-r--r--tool/transcode-tblgen.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 493e3b1..e4ee481 100644
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -317,7 +317,8 @@ class ActionMap
min = max = 0
end
- if n = OffsetsMemo[offsets]
+ offsets_key = [min, max, offsets[min..max]]
+ if n = OffsetsMemo[offsets_key]
offsets_name = n
offsets_code = ''
else
@@ -326,7 +327,7 @@ class ActionMap
static const unsigned char
#{offsets_name}[#{2+max-min+1}] = #{format_offsets(min,max,offsets)};
End
- OffsetsMemo[offsets] = offsets_name
+ OffsetsMemo[offsets_key] = offsets_name
end
if n = InfosMemo[infos]
@@ -524,6 +525,7 @@ ValidEncoding = {
}
{
+ 'ASCII-8BIT' => '1byte',
'ISO-8859-1' => '1byte',
'ISO-8859-2' => '1byte',
'ISO-8859-3' => '1byte',