ruby-changes:7782
From: akr <ko1@a...>
Date: Fri, 12 Sep 2008 21:24:03 +0900 (JST)
Subject: [ruby-changes:7782] Ruby:r19303 (trunk): * transcode.c (rb_econv_t): new field: started.
akr 2008-09-12 21:23:25 +0900 (Fri, 12 Sep 2008) New Revision: 19303 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19303 Log: * transcode.c (rb_econv_t): new field: started. (rb_econv_open_by_transcoder_entries): initialize started field. (rb_econv_convert): set started field. (rb_econv_insert_output): ditto. (rb_econv_decorate_at): check started field instead of num_finished. Modified files: trunk/ChangeLog trunk/transcode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 19302) +++ ChangeLog (revision 19303) @@ -1,3 +1,11 @@ +Fri Sep 12 21:22:09 2008 Tanaka Akira <akr@f...> + + * transcode.c (rb_econv_t): new field: started. + (rb_econv_open_by_transcoder_entries): initialize started field. + (rb_econv_convert): set started field. + (rb_econv_insert_output): ditto. + (rb_econv_decorate_at): check started field instead of num_finished. + Fri Sep 12 20:28:59 2008 Tanaka Akira <akr@f...> * regenc.c (onigenc_single_byte_code_to_mbc): follow OnigEncoding Index: transcode.c =================================================================== --- transcode.c (revision 19302) +++ transcode.c (revision 19303) @@ -97,6 +97,8 @@ const char *source_encoding_name; const char *destination_encoding_name; + int started; + const unsigned char *replacement_str; size_t replacement_len; const char *replacement_enc; @@ -788,6 +790,7 @@ ec->flags = 0; ec->source_encoding_name = NULL; ec->destination_encoding_name = NULL; + ec->started = 0; ec->replacement_str = NULL; ec->replacement_len = 0; ec->replacement_enc = NULL; @@ -1331,6 +1334,8 @@ unsigned char empty_buf; unsigned char *empty_ptr = &empty_buf; + ec->started = 1; + if (!input_ptr) { input_ptr = (const unsigned char **)&empty_ptr; input_stop = empty_ptr; @@ -1478,6 +1483,8 @@ size_t need; + ec->started = 1; + if (len == 0) return 0; @@ -1729,7 +1736,7 @@ unsigned char *p; int bufsize = 4096; - if (ec->num_finished != 0) + if (ec->started != 0) return -1; entry = get_transcoder_entry("", decorator_name); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/