зеркало из https://github.com/github/ruby.git
* transcode.c (str_transcode): initialize transcoder in
rb_transcoding. [ruby-dev:33234] * transcode_data.h (rb_transcoding): transcoder constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
91625011c2
Коммит
f5eb90f3c2
|
@ -1,3 +1,10 @@
|
|||
Mon Jan 21 14:32:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* transcode.c (str_transcode): initialize transcoder in
|
||||
rb_transcoding. [ruby-dev:33234]
|
||||
|
||||
* transcode_data.h (rb_transcoding): transcoder constified.
|
||||
|
||||
Mon Jan 21 12:50:02 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c, gc.c (setjmp): sigsetjmp is a macro on cygwin.
|
||||
|
|
|
@ -311,6 +311,8 @@ 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))) {
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef struct byte_lookup {
|
|||
/* dynamic structure, one per conversion (similar to iconv_t) */
|
||||
/* may carry conversion state (e.g. for iso-2022-jp) */
|
||||
typedef struct rb_transcoding {
|
||||
struct rb_transcoder *transcoder;
|
||||
const struct rb_transcoder *transcoder;
|
||||
VALUE ruby_string_dest; /* the String used as the conversion destination,
|
||||
or NULL if something else is being converted */
|
||||
unsigned char *(*flush_func)(struct rb_transcoding*, int, int);
|
||||
|
|
Загрузка…
Ссылка в новой задаче