1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
akr 2008-09-03 11:48:17 +00:00
parent 9233dc9bf4
commit 4277473d5b
3 changed files with 14 additions and 1 deletions

View file

@ -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.

View file

@ -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

View file

@ -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;