summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-06 13:42:21 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-06 13:42:21 +0000
commite22b3b773dfda0c1136c11d25376587c5fce60f9 (patch)
tree90eb73408735c88921b01fa821934873a5d4752e
parent7d072e2ba4c318fdd97bfcd093e160efdb8dc03d (diff)
* tool/transcode-tblgen.rb (transcode_generate_node): code
argument removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--enc/trans/utf_16_32.erb.c20
-rw-r--r--tool/transcode-tblgen.rb4
3 files changed, 13 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 3297fcc340a..41fab76ae67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 6 22:40:48 2008 Tanaka Akira <akr@fsij.org>
+
+ * tool/transcode-tblgen.rb (transcode_generate_node): code
+ argument removed.
+
Wed Aug 6 21:25:45 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (chain_finalized_object): deletes finalizers to be invoked from
diff --git a/enc/trans/utf_16_32.erb.c b/enc/trans/utf_16_32.erb.c
index 496bf8059f2..5f5af5294e0 100644
--- a/enc/trans/utf_16_32.erb.c
+++ b/enc/trans/utf_16_32.erb.c
@@ -185,9 +185,7 @@ fun_so_to_utf_32le(const unsigned char* s, unsigned char* o)
map["{d8-db}{00-ff}{dc-df}{00-ff}"] = :func_so
map["{dc-df}{00-ff}"] = :invalid
map["{d8-db}{00-ff}{00-db,e0-ff}{00-ff}"] = :invalid
- code = ''
- transcode_generate_node(ActionMap.parse(map), code, "from_UTF_16BE", [])
- code
+ transcode_generate_node(ActionMap.parse(map), "from_UTF_16BE", [])
%>
static const rb_transcoder
@@ -212,10 +210,8 @@ rb_from_UTF_16BE = {
map["ed{a0-bf}"] = :invalid
map["f0{80-8f}"] = :invalid
map["f4{90-bf}"] = :invalid
- code = ''
am = ActionMap.parse(map)
- transcode_generate_node(am, code, "to_UTF_16BE", [0x00..0xff, 0x80..0xbf, 0x80..0xbf, 0x80..0xbf])
- code
+ transcode_generate_node(am, "to_UTF_16BE", [0x00..0xff, 0x80..0xbf, 0x80..0xbf, 0x80..0xbf])
%>
static const rb_transcoder
@@ -230,9 +226,7 @@ rb_to_UTF_16BE = {
map["{00-ff}{d8-db}{00-ff}{dc-df}"] = :func_so
map["{00-ff}{dc-df}"] = :invalid
map["{00-ff}{d8-db}{00-ff}{00-db,e0-ff}"] = :invalid
- code = ''
- transcode_generate_node(ActionMap.parse(map), code, "from_UTF_16LE", [])
- code
+ transcode_generate_node(ActionMap.parse(map), "from_UTF_16LE", [])
%>
static const rb_transcoder
@@ -254,9 +248,7 @@ rb_to_UTF_16LE = {
map["00{11-ff}{00-ff}{00-ff}"] = :invalid
map["0000{d8-df}{00-ff}"] = :invalid
map["{01-ff}{00-ff}{00-ff}{00-ff}"] = :invalid
- code = ''
- transcode_generate_node(ActionMap.parse(map), code, "from_UTF_32BE", [])
- code
+ transcode_generate_node(ActionMap.parse(map), "from_UTF_32BE", [])
%>
static const rb_transcoder
@@ -278,9 +270,7 @@ rb_to_UTF_32BE = {
map["{00-ff}{00-ff}{00-ff}{01-ff}"] = :invalid
map["{00-ff}{00-ff}{11-ff}00"] = :invalid
map["{00-ff}{d8-df}0000"] = :invalid
- code = ''
- transcode_generate_node(ActionMap.parse(map), code, "from_UTF_32LE", [])
- code
+ transcode_generate_node(ActionMap.parse(map), "from_UTF_32LE", [])
%>
static const rb_transcoder
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 4dc2d67f347..bdc8752f50e 100644
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -415,9 +415,11 @@ End
tree_code + "\n" + transcoder_code
end
-def transcode_generate_node(am, code, name_hint=nil, ranges=[])
+def transcode_generate_node(am, name_hint=nil, ranges=[])
STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE
+ code = ''
am.generate_node(code, name_hint, ranges)
+ code
end
def transcode_register_code