From a576905b3f5fc7d2dbc58134ed3770da32d13e87 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 26 Aug 2008 15:01:11 +0000 Subject: * include/ruby/encoding.h (rb_econv_elem_t): move to transcode.c (rb_econv_t): defined as an incomplete type. * transcode.c (rb_econv_elem_t): moved from encoding.h. (rb_econv_t): complete type defined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index fa3ebeff1..3c0fcd257 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -205,52 +205,12 @@ typedef enum { econv_output_followed_by_input, } 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); -- cgit