From 6eb3843b178c5bca28a3c8d73b8af5f58de21e22 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 15 Sep 2008 15:42:30 +0000 Subject: * transcode_data.h (STR1_LENGTH): defined. (makeSTR1LEN): defined. * tool/transcode-tblgen.rb: use makeSTR1LEN. generate STR1 for 4 to 259 bytes. * transcode.c (rb_transcoding): new field: output_index. (transcode_restartable0): use STR1_LENGTH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- transcode_data.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'transcode_data.h') diff --git a/transcode_data.h b/transcode_data.h index 5566e7b2d0..497eb3c51b 100644 --- a/transcode_data.h +++ b/transcode_data.h @@ -34,10 +34,12 @@ #define FUNsi (PType 0x0D) /* function from start to info */ #define FUNio (PType 0x0E) /* function from info to output */ #define FUNso (PType 0x0F) /* function from start to output */ -#define STR1 (PType 0x11) /* string up to 255 bytes: 1byte length + content */ +#define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */ +#define STR1_LENGTH(byte_addr) (*(byte_addr) + 4) #define STR1_BYTEINDEX(w) ((w) >> 6) #define makeSTR1(bi) (((bi) << 6) | STR1) +#define makeSTR1LEN(len) ((len)-4) #define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt)) #define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt)) -- cgit v1.2.1