summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 11:48:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 11:48:17 +0000
commit4277473d5b42ae87dab2e2203c5f7602e41f9456 (patch)
treec6b456d6271dfff134c834f19f0d0d2423cb2dfa
parent9233dc9bf4072a20f67c25df5ce181f614edccd7 (diff)
* transcode_data.h (rb_transcoder): new field: byte_array_length and
word_array_length. * tool/transcode-tblgen.rb (transcode_generated_code): generate byte_array_length and word_array_length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--tool/transcode-tblgen.rb5
-rw-r--r--transcode_data.h2
3 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2589dc8f2f3..8507ab4f40e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Sep 3 20:47:31 2008 Tanaka Akira <akr@fsij.org>
+
+ * transcode_data.h (rb_transcoder): new field: byte_array_length and
+ word_array_length.
+
+ * tool/transcode-tblgen.rb (transcode_generated_code): generate
+ byte_array_length and word_array_length.
+
Wed Sep 3 20:34:10 2008 Tanaka Akira <akr@fsij.org>
* tool/transcode-tblgen.rb (ArrayCode): new class.
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 97382050228..cbeccc35ec9 100644
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -607,7 +607,10 @@ end
def transcode_generated_code
TRANSCODE_GENERATED_BYTES_CODE.to_s +
TRANSCODE_GENERATED_WORDS_CODE.to_s +
- "\#define TRANSCODE_TABLE_INFO #{OUTPUT_PREFIX}byte_array, #{OUTPUT_PREFIX}word_array, sizeof(unsigned int)\n" +
+ "\#define TRANSCODE_TABLE_INFO " +
+ "#{OUTPUT_PREFIX}byte_array, #{TRANSCODE_GENERATED_BYTES_CODE.length}, " +
+ "#{OUTPUT_PREFIX}word_array, #{TRANSCODE_GENERATED_WORDS_CODE.length}, " +
+ "sizeof(unsigned int)\n" +
TRANSCODE_GENERATED_TRANSCODER_CODE
end
diff --git a/transcode_data.h b/transcode_data.h
index 90a946cce24..1ceb0cf4738 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -104,7 +104,9 @@ struct rb_transcoder {
const char *to_encoding;
unsigned int conv_tree_start;
const unsigned char *byte_array;
+ unsigned int byte_array_length;
const unsigned int *word_array;
+ unsigned int word_array_length;
int word_size;
int input_unit_length;
int max_input;