diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-15 23:13:01 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-15 23:13:01 +0000 |
commit | a55e167b68d123866b44a14f31411eafdcb56037 (patch) | |
tree | 5d4ab3bc9bf7c6f10677cedd63848fb7430bca6d /transcode_data.h | |
parent | aafb3af52b99f5bc708ac4fd033b9a6899f1dacc (diff) |
* transcode_data.h (rb_transcoder_stateful_type_t): defined.
(rb_transcoder): add field: stateful_type.
* tool/transcode-tblgen.rb: generate stateful_type field as
stateless_converter.
* enc/trans/iso2022.trans: follow rb_transcoder change.
* enc/trans/newline.trans: ditto.
* enc/trans/utf_16_32.trans: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r-- | transcode_data.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/transcode_data.h b/transcode_data.h index 69f3048124..1b8eeae379 100644 --- a/transcode_data.h +++ b/transcode_data.h @@ -56,6 +56,13 @@ typedef struct byte_lookup { #define TWOTRAIL /* legal but undefined if two more trailing UTF-8 */ #define THREETRAIL /* legal but undefined if three more trailing UTF-8 */ +typedef enum { + stateless_converter, /* stateless -> stateless */ + stateful_decoder, /* stateful -> stateless */ + stateful_encoder /* stateless -> stateful */ + /* stateful -> stateful is intentionally ommitted. */ +} rb_transcoder_stateful_type_t; + typedef struct rb_transcoder rb_transcoder; /* dynamic structure, one per conversion (similar to iconv_t) */ @@ -103,6 +110,7 @@ struct rb_transcoder { int input_unit_length; int max_input; int max_output; + rb_transcoder_stateful_type_t stateful_type; VALUE (*func_ii)(rb_transcoding*, VALUE); /* info -> info */ VALUE (*func_si)(rb_transcoding*, const unsigned char*, size_t); /* start -> info */ int (*func_io)(rb_transcoding*, VALUE, const unsigned char*); /* info -> output */ |