aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/encoding.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/encoding.h')
-rw-r--r--include/ruby/encoding.h42
1 files changed, 1 insertions, 41 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index fa3ebeff1d..3c0fcd2572 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -206,51 +206,11 @@ typedef enum {
} rb_econv_result_t;
typedef struct {
- struct rb_transcoding *tc;
- unsigned char *out_buf_start;
- unsigned char *out_data_start;
- unsigned char *out_data_end;
- unsigned char *out_buf_end;
- rb_econv_result_t last_result;
-} rb_econv_elem_t;
-
-typedef struct {
int flags;
/* replacement character, etc. */
} rb_econv_option_t;
-typedef struct {
- rb_econv_option_t opts;
- const char *source_encoding_name;
- const char *destination_encoding_name;
-
- unsigned char *in_buf_start;
- unsigned char *in_data_start;
- unsigned char *in_data_end;
- unsigned char *in_buf_end;
- rb_econv_elem_t *elems;
- int num_trans;
- int num_finished;
- int last_trans_index; /* last trans, not including universal newline */
- struct rb_transcoding *last_tc;
-
- /* last error */
- struct {
- rb_econv_result_t result;
- struct rb_transcoding *error_tc;
- const char *source_encoding;
- const char *destination_encoding;
- const unsigned char *error_bytes_start;
- size_t error_bytes_len;
- size_t readagain_len;
- int partial_input;
- } last_error;
-
- /* The following fields are only for Encoding::Converter.
- * rb_econv_open set them NULL. */
- rb_encoding *source_encoding;
- rb_encoding *destination_encoding;
-} rb_econv_t;
+typedef struct rb_econv_t rb_econv_t;
VALUE rb_str_transcode(VALUE str, VALUE to, rb_econv_option_t *ecopts);