aboutsummaryrefslogtreecommitdiffstats
path: root/transcode.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-16 11:10:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-16 11:10:10 +0000
commite54f880643a91c9bb1dcecc5cec6b43254ef466d (patch)
tree34d61994719da2d53d866813294afb60d5ddaa2d /transcode.c
parentbc4c51eccea7d6d549bcf2874182022043974971 (diff)
downloadruby-e54f880643a91c9bb1dcecc5cec6b43254ef466d.tar.gz
* transcode.c (transcode_restartable0): refix can't build with VC9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/transcode.c b/transcode.c
index 7d2d115cb3..524ea660dc 100644
--- a/transcode.c
+++ b/transcode.c
@@ -540,15 +540,20 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
follow_info:
switch (next_info & 0x1F) {
case NOMAP:
- {
- const unsigned char *pend = in_p;
- in_p = inchar_start;
- while (in_p < pend) {
- next_byte = (unsigned char)*in_p++;
- SUSPEND_OBUF(3); *out_p++ = next_byte;
- }
- }
- continue;
+ {
+ const unsigned char *p = inchar_start;
+ writebuf_off = 0;
+ while (p < in_p) {
+ TRANSCODING_WRITEBUF(tc)[writebuf_off++] = (unsigned char)*p++;
+ }
+ writebuf_len = writebuf_off;
+ writebuf_off = 0;
+ while (writebuf_off < writebuf_len) {
+ SUSPEND_OBUF(3);
+ *out_p++ = TRANSCODING_WRITEBUF(tc)[writebuf_off++];
+ }
+ }
+ continue;
case 0x00: case 0x04: case 0x08: case 0x0C:
case 0x10: case 0x14: case 0x18: case 0x1C:
SUSPEND_AFTER_OUTPUT(25);