diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-01 14:33:56 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-01 14:33:56 +0000 |
| commit | 05cf9175f40ae029961ecff4b8c9eae271ca4b00 (patch) | |
| tree | 1e830150da3df89a9b81865c9028459185eefb1f /transcode.c | |
| parent | 4cfbae254e99badf52f6e251b78dfc082d7eb493 (diff) | |
| download | ruby-05cf9175f40ae029961ecff4b8c9eae271ca4b00.tar.gz ruby-05cf9175f40ae029961ecff4b8c9eae271ca4b00.tar.xz ruby-05cf9175f40ae029961ecff4b8c9eae271ca4b00.zip | |
* transcode_data.h (BYTE_LOOKUP_BASE): abstract accessor for
BYTE_LOOKUP.
(BYTE_LOOKUP_INFO): ditto.
* transcode.c (transcode_restartable0): use BYTE_LOOKUP_BASE and
BYTE_LOOKUP_INFO.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
| -rw-r--r-- | transcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/transcode.c b/transcode.c index 53c0ae701..a67565e3e 100644 --- a/transcode.c +++ b/transcode.c @@ -493,11 +493,11 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos, next_byte = (unsigned char)*in_p++; follow_byte: - if (next_byte < next_table->base[0] || next_table->base[1] < next_byte) + if (next_byte < BYTE_LOOKUP_BASE(next_table)[0] || BYTE_LOOKUP_BASE(next_table)[1] < next_byte) next_info = INVALID; else { - unsigned int next_offset = next_table->base[2+next_byte-next_table->base[0]]; - next_info = (VALUE)next_table->info[next_offset]; + unsigned int next_offset = BYTE_LOOKUP_BASE(next_table)[2+next_byte-BYTE_LOOKUP_BASE(next_table)[0]]; + next_info = (VALUE)BYTE_LOOKUP_INFO(next_table)[next_offset]; } follow_info: switch (next_info & 0x1F) { |
