mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* transcode_data.h: return output functions ssize_t.
* transcode.c (transcode_restartable0): don't need to cast the result of output functions. * enc/trans/newline.trans: follow the type change. * enc/trans/escape.trans: ditto. * enc/trans/utf_16_32.trans: ditto. * enc/trans/iso2022.trans: ditto. * enc/trans/japanese.trans: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a3c8c0adec
commit
c767be3039
8 changed files with 44 additions and 28 deletions
11
transcode.c
11
transcode.c
|
@ -604,11 +604,10 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
|
|||
case FUNio:
|
||||
SUSPEND_OBUF(13);
|
||||
if (tr->max_output <= out_stop - out_p)
|
||||
out_p += (VALUE)(*tr->func_io)(TRANSCODING_STATE(tc),
|
||||
next_info,
|
||||
out_p, out_stop - out_p);
|
||||
out_p += tr->func_io(TRANSCODING_STATE(tc),
|
||||
next_info, out_p, out_stop - out_p);
|
||||
else {
|
||||
writebuf_len = (VALUE)(*tr->func_io)(TRANSCODING_STATE(tc),
|
||||
writebuf_len = tr->func_io(TRANSCODING_STATE(tc),
|
||||
next_info,
|
||||
TRANSCODING_WRITEBUF(tc), TRANSCODING_WRITEBUF_SIZE(tc));
|
||||
writebuf_off = 0;
|
||||
|
@ -625,13 +624,13 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
|
|||
SUSPEND_OBUF(14);
|
||||
if (tr->max_output <= out_stop - out_p) {
|
||||
char_start = transcode_char_start(tc, *in_pos, inchar_start, in_p, &char_len);
|
||||
out_p += (VALUE)(*tr->func_so)(TRANSCODING_STATE(tc),
|
||||
out_p += tr->func_so(TRANSCODING_STATE(tc),
|
||||
char_start, (size_t)char_len,
|
||||
out_p, out_stop - out_p);
|
||||
}
|
||||
else {
|
||||
char_start = transcode_char_start(tc, *in_pos, inchar_start, in_p, &char_len);
|
||||
writebuf_len = (VALUE)(*tr->func_so)(TRANSCODING_STATE(tc),
|
||||
writebuf_len = tr->func_so(TRANSCODING_STATE(tc),
|
||||
char_start, (size_t)char_len,
|
||||
TRANSCODING_WRITEBUF(tc), TRANSCODING_WRITEBUF_SIZE(tc));
|
||||
writebuf_off = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue