summaryrefslogtreecommitdiff
path: root/transcode_data.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 14:34:09 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 14:34:09 (GMT)
commit1afc1b7bc806c66786b90cc6c6a764f71b4c251f (patch)
tree5bb516e1817d569f2882329b9aab56d582bffcb2 /transcode_data.h
parentf6441bf61cd4244aca5f465d262baf31b8872ac2 (diff)
* transcode.c (rb_transcoding): moved from transcode_data.h.
(TRANSCODING_READBUF): ditto. (TRANSCODING_WRITEBUF): ditto. (TRANSCODING_STATE_EMBED_MAX): ditto. (TRANSCODING_STATE): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r--transcode_data.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/transcode_data.h b/transcode_data.h
index a7f1db0..8442355 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -64,48 +64,6 @@ typedef enum {
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 rb_transcoder *transcoder;
-
- int flags;
-
- int resume_position;
- unsigned int next_table;
- VALUE next_info;
- unsigned char next_byte;
-
- int recognized_len; /* already interpreted */
- int readagain_len; /* not yet interpreted */
- union {
- unsigned char ary[8]; /* max_input <= sizeof(ary) */
- unsigned char *ptr; /* length: max_input */
- } readbuf; /* recognized_len + readagain_len used */
-
- int writebuf_off;
- int writebuf_len;
- union {
- unsigned char ary[8]; /* max_output <= sizeof(ary) */
- unsigned char *ptr; /* length: max_output */
- } writebuf;
-
- void *state; /* opaque data for stateful encoding */
-} rb_transcoding;
-#define TRANSCODING_READBUF(tc) \
- ((tc)->transcoder->max_input <= sizeof((tc)->readbuf.ary) ? \
- (tc)->readbuf.ary : \
- (tc)->readbuf.ptr)
-#define TRANSCODING_WRITEBUF(tc) \
- ((tc)->transcoder->max_output <= sizeof((tc)->writebuf.ary) ? \
- (tc)->writebuf.ary : \
- (tc)->writebuf.ptr)
-#define TRANSCODING_STATE_EMBED_MAX sizeof(void *)
-#define TRANSCODING_STATE(tc) \
- ((tc)->transcoder->state_size <= sizeof((tc)->state) ? \
- (void *)&(tc)->state : \
- (tc)->state)
-
/* static structure, one per supported encoding pair */
struct rb_transcoder {
const char *from_encoding;