mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* transcode_data.h (o3): prevent sign extension on 64bit environment.
(o4): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5727e9c980
commit
784ccb5806
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Sep 2 04:00:37 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* transcode_data.h (o3): prevent sign extension on 64bit environment.
|
||||
(o4): ditto.
|
||||
|
||||
Tue Sep 2 03:26:24 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* tool/transcode-tblgen.rb: comment removed in generated code.
|
||||
|
|
|
@ -41,8 +41,8 @@ typedef uintptr_t BYTE_LOOKUP[2];
|
|||
|
||||
#define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt))
|
||||
#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt))
|
||||
#define o3(b1,b2,b3) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|THREEbt))
|
||||
#define o4(b0,b1,b2,b3) (PType((((unsigned char)(b1))<< 8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt))
|
||||
#define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|THREEbt)&0xffffffffU))
|
||||
#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<< 8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))
|
||||
|
||||
#define getBT1(a) (((a)>> 8)&0xFF)
|
||||
#define getBT2(a) (((a)>>16)&0xFF)
|
||||
|
|
Loading…
Add table
Reference in a new issue