diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-12 06:10:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-12 06:10:33 +0000 |
commit | 871cd27c8dd54e2fac7205d91b419a8a6ed82412 (patch) | |
tree | 982ccea1a770212416a058b2db30b3c2cc82583e /gc.c | |
parent | e2aaf978b52b1d7134b9722dc6ac6b3e108168a3 (diff) | |
download | ruby-871cd27c8dd54e2fac7205d91b419a8a6ed82412.tar.gz |
* gc.c (GET_HEAP_HEADER, NUM_IN_SLOT): parenthesise macro parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -551,10 +551,10 @@ rb_objspace_free(rb_objspace_t *objspace) #define HEAP_OBJ_LIMIT (unsigned int)((HEAP_SIZE - sizeof(struct heaps_header))/sizeof(struct RVALUE)) #define HEAP_BITMAP_LIMIT CEILDIV(CEILDIV(HEAP_SIZE, sizeof(struct RVALUE)), sizeof(uintptr_t)*8) -#define GET_HEAP_HEADER(x) (HEAP_HEADER(((uintptr_t)x) & ~(HEAP_ALIGN_MASK))) +#define GET_HEAP_HEADER(x) (HEAP_HEADER((uintptr_t)(x) & ~(HEAP_ALIGN_MASK))) #define GET_HEAP_SLOT(x) (GET_HEAP_HEADER(x)->base) #define GET_HEAP_BITMAP(x) (GET_HEAP_HEADER(x)->bits) -#define NUM_IN_SLOT(p) (((uintptr_t)p & HEAP_ALIGN_MASK)/sizeof(RVALUE)) +#define NUM_IN_SLOT(p) (((uintptr_t)(p) & HEAP_ALIGN_MASK)/sizeof(RVALUE)) #define BITMAP_INDEX(p) (NUM_IN_SLOT(p) / (sizeof(uintptr_t) * 8)) #define BITMAP_OFFSET(p) (NUM_IN_SLOT(p) & ((sizeof(uintptr_t) * 8)-1)) #define MARKED_IN_BITMAP(bits, p) (bits[BITMAP_INDEX(p)] & ((uintptr_t)1 << BITMAP_OFFSET(p))) |