path: root/transcode_data.h
diff options
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-02 13:26:02 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-02 13:26:02 +0000
commit41e1933fd8df02d3244aa477f4f5a78d7ff12e65 (patch)
treeae5760281f2cc91f69a443bb5f5c1f85246759d7 /transcode_data.h
parent39f172f9d73d140e5e8ed914f151e130f0cb883c (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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
1 files changed, 6 insertions, 10 deletions
diff --git a/transcode_data.h b/transcode_data.h
index 14fb1336d13..90a946cce24 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -14,16 +14,12 @@
-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)
#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;