1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* transcode.c (str_transcode): initialize transcoder in

rb_transcoding.  [ruby-dev:33234]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-01-21 05:36:16 +00:00
parent f5eb90f3c2
commit 282e828c59
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
Mon Jan 21 14:32:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
Mon Jan 21 14:36:14 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* transcode.c (str_transcode): initialize transcoder in
rb_transcoding. [ruby-dev:33234]

View file

@ -311,14 +311,14 @@ str_transcode(int argc, VALUE *argv, VALUE *self)
return -1;
}
my_transcoding.transcoder = my_transcoder;
while (!final_encoding) { /* loop for multistep transcoding */
/* later, maybe use smaller intermediate strings for very long strings */
if (!(my_transcoder = transcode_dispatch(from_e, to_e))) {
rb_raise(rb_eArgError, "transcoding not supported (from %s to %s)", from_e, to_e);
}
my_transcoding.transcoder = my_transcoder;
if (my_transcoder->preprocessor) {
fromp = sp = (unsigned char *)RSTRING_PTR(str);
slen = RSTRING_LEN(str);