diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-02 13:26:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-02 13:26:02 +0000 |
commit | 41e1933fd8df02d3244aa477f4f5a78d7ff12e65 (patch) | |
tree | ae5760281f2cc91f69a443bb5f5c1f85246759d7 /transcode_data.h | |
parent | 39f172f9d73d140e5e8ed914f151e130f0cb883c (diff) |
* transcode_data.h (base_element): removed.
(BYTE_LOOKUP): removed.
(BYTE_LOOKUP_BASE): don't cast.
(BYTE_LOOKUP_INFO): ditto.
(PType): unsigned int, instead of uintptr_t.
(rb_transcoding): change type of next_field, conv_tree_start and
word_array.
* tool/transcode-tblgen.rb: generate word_array as array of unsigned
int.
* transcode.c (transcode_restartable0): follow the above type change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r-- | transcode_data.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/transcode_data.h b/transcode_data.h index 14fb1336d1..90a946cce2 100644 --- a/transcode_data.h +++ b/transcode_data.h @@ -14,16 +14,12 @@ #ifndef RUBY_TRANSCODE_DATA_H #define RUBY_TRANSCODE_DATA_H 1 -typedef unsigned char base_element; - -typedef uintptr_t BYTE_LOOKUP[2]; - -#define BYTE_LOOKUP_BASE(bl) (((uintptr_t *)(bl))[0]) -#define BYTE_LOOKUP_INFO(bl) (((uintptr_t *)(bl))[1]) +#define BYTE_LOOKUP_BASE(bl) ((bl)[0]) +#define BYTE_LOOKUP_INFO(bl) ((bl)[1]) #ifndef PType /* data file needs to treat this as a pointer, to remove warnings */ -#define PType (uintptr_t) +#define PType (unsigned int) #endif #define NOMAP (PType 0x01) /* single byte direct map */ @@ -73,7 +69,7 @@ typedef struct rb_transcoding { int flags; int resume_position; - uintptr_t next_table; + unsigned int next_table; VALUE next_info; unsigned char next_byte; @@ -106,9 +102,9 @@ typedef struct rb_transcoding { struct rb_transcoder { const char *from_encoding; const char *to_encoding; - uintptr_t conv_tree_start; + unsigned int conv_tree_start; const unsigned char *byte_array; - const uintptr_t *word_array; + const unsigned int *word_array; int word_size; int input_unit_length; int max_input; |