diff --git a/ChangeLog b/ChangeLog index 2589dc8f2f..8507ab4f40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Sep 3 20:47:31 2008 Tanaka Akira + + * 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 * tool/transcode-tblgen.rb (ArrayCode): new class. diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb index 9738205022..cbeccc35ec 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 90a946cce2..1ceb0cf473 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;