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): typedef at first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-08-11 22:00:48 +00:00
parent 425098de96
commit c1361132bc
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Tue Aug 12 07:00:02 2008 Tanaka Akira <akr@fsij.org>
* transcode_data.h (rb_transcoder): typedef at first.
Tue Aug 12 06:48:35 2008 Tanaka Akira <akr@fsij.org>
* transcode.c (rb_trans_conv): find second last error.

View file

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