summaryrefslogtreecommitdiff
path: root/transcode_data.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 12:35:29 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-03 12:35:29 (GMT)
commit6378201f8b202e493613d1c0936788ddbe708c76 (patch)
tree8f472b33224e030d81d84824b4c06a786e4a9379 /transcode_data.h
parentb99c31b38f883ef5dcd74dd9f791de7f1089435e (diff)
* transcode_data.h (WORDINDEX_SHIFT_BITS): defined.
(WORDINDEX2INFO): defined. (INFO2WORDINDEX): defined. * tool/transcode-tblgen.rb: use WORDINDEX2INFO. * transcode.c: use INFO2WORDINDEX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode_data.h')
-rw-r--r--transcode_data.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/transcode_data.h b/transcode_data.h
index 1ceb0cf..6081aec 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -14,6 +14,9 @@
#ifndef RUBY_TRANSCODE_DATA_H
#define RUBY_TRANSCODE_DATA_H 1
+#define WORDINDEX_SHIFT_BITS 2
+#define WORDINDEX2INFO(widx) ((widx) << WORDINDEX_SHIFT_BITS)
+#define INFO2WORDINDEX(info) ((info) >> WORDINDEX_SHIFT_BITS)
#define BYTE_LOOKUP_BASE(bl) ((bl)[0])
#define BYTE_LOOKUP_INFO(bl) ((bl)[1])