mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* regint.h (GET_ALIGNMENT_PAD_SIZE, ALIGNMENT_RIGHT): cast pointer to
uintptr_t instead of unsigned int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
104e841390
commit
f5e45d00eb
2 changed files with 11 additions and 6 deletions
4
regint.h
4
regint.h
|
@ -262,13 +262,13 @@
|
|||
|
||||
#define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
|
||||
(pad_size) = WORD_ALIGNMENT_SIZE \
|
||||
- ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
|
||||
- ((uintptr_t )(addr) % WORD_ALIGNMENT_SIZE);\
|
||||
if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\
|
||||
} while (0)
|
||||
|
||||
#define ALIGNMENT_RIGHT(addr) do {\
|
||||
(addr) += (WORD_ALIGNMENT_SIZE - 1);\
|
||||
(addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
|
||||
(addr) -= ((uintptr_t )(addr) % WORD_ALIGNMENT_SIZE);\
|
||||
} while (0)
|
||||
|
||||
#endif /* PLATFORM_UNALIGNED_WORD_ACCESS */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue