summaryrefslogtreecommitdiff
path: root/transcode_data.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-01 17:40:32 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-01 17:40:32 (GMT)
commit7908180df1364bc6a20cdbf2cb1365f1f0da21fa (patch)
tree4caf1aa63bc2e4fe3b3ef506a074a5fd2a2cf18d /transcode_data.h
parent6c835ee50ae152daf75d4bd3a63570b7480b1c89 (diff)
* tool/transcode-tblgen.rb: record offsets array as index of
byte_array to avoid relocation. * transcode.c (transcode_restartable0): add byte_array to get offsets array. * transcode_data.h (BYTE_LOOKUP_BASE): change return type to uintptr_t. (rb_transcoder): add fields: byte_array, word_array and word_size. * enc/trans/newline.trans: follow rb_transcoder change. * enc/trans/iso2022.trans: ditto. * enc/trans/utf_16_32.trans: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r--transcode_data.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/transcode_data.h b/transcode_data.h
index 8287cf6..a403916 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -18,7 +18,7 @@ typedef unsigned char base_element;
typedef uintptr_t BYTE_LOOKUP[2];
-#define BYTE_LOOKUP_BASE(bl) ((const base_element *)(((uintptr_t *)(bl))[0]))
+#define BYTE_LOOKUP_BASE(bl) (((uintptr_t *)(bl))[0])
#define BYTE_LOOKUP_INFO(bl) ((const struct byte_lookup *const *)(((uintptr_t *)(bl))[1]))
#ifndef PType
@@ -107,6 +107,9 @@ struct rb_transcoder {
const char *from_encoding;
const char *to_encoding;
uintptr_t conv_tree_start;
+ const unsigned char *byte_array;
+ const uintptr_t *word_array;
+ int word_size;
int input_unit_length;
int max_input;
int max_output;