diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-11 22:00:48 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-11 22:00:48 +0000 |
commit | c1361132bcf4dcd21d93bb51c5a61f9535280420 (patch) | |
tree | 083b42d6c86c4702b34d73cddf9c65ec5cb6205a /transcode_data.h | |
parent | 425098de96b3b51bdb99090eef39134867ba32ca (diff) | |
download | ruby-c1361132bcf4dcd21d93bb51c5a61f9535280420.tar.gz |
* transcode_data.h (rb_transcoder): typedef at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r-- | transcode_data.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/transcode_data.h b/transcode_data.h index f9e9de4aef..1dc7ac8e92 100644 --- a/transcode_data.h +++ b/transcode_data.h @@ -56,10 +56,12 @@ 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 struct rb_transcoder rb_transcoder; + /* dynamic structure, one per conversion (similar to iconv_t) */ /* may carry conversion state (e.g. for iso-2022-jp) */ typedef struct rb_transcoding { - const struct rb_transcoder *transcoder; + const rb_transcoder *transcoder; int flags; @@ -82,7 +84,7 @@ typedef struct rb_transcoding { (tc)->readbuf.ptr) /* static structure, one per supported encoding pair */ -typedef struct rb_transcoder { +struct rb_transcoder { const char *from_encoding; const char *to_encoding; const BYTE_LOOKUP *conv_tree_start; @@ -94,7 +96,7 @@ typedef struct rb_transcoder { int (*func_io)(rb_transcoding*, VALUE, const unsigned char*); /* info -> output */ int (*func_so)(rb_transcoding*, const unsigned char*, size_t, unsigned char*); /* start -> output */ int (*finish_func)(rb_transcoding*, unsigned char*); /* -> output */ -} rb_transcoder; +}; typedef enum { transcode_invalid_input, |