зеркало из https://github.com/github/ruby.git
Parenthesize macro arguments
This commit is contained in:
Родитель
129b4936bf
Коммит
196d59f690
8
shape.c
8
shape.c
|
@ -32,11 +32,13 @@
|
||||||
|
|
||||||
#define REDBLACK_CACHE_SIZE (SHAPE_BUFFER_SIZE * 32)
|
#define REDBLACK_CACHE_SIZE (SHAPE_BUFFER_SIZE * 32)
|
||||||
|
|
||||||
|
/* This depends on that the allocated memory by Ruby's allocator or
|
||||||
|
* mmap is not located at an odd address. */
|
||||||
#define SINGLE_CHILD_TAG 0x1
|
#define SINGLE_CHILD_TAG 0x1
|
||||||
#define TAG_SINGLE_CHILD(x) (struct rb_id_table *)((uintptr_t)x | SINGLE_CHILD_TAG)
|
#define TAG_SINGLE_CHILD(x) (struct rb_id_table *)((uintptr_t)(x) | SINGLE_CHILD_TAG)
|
||||||
#define SINGLE_CHILD_MASK (~((uintptr_t)SINGLE_CHILD_TAG))
|
#define SINGLE_CHILD_MASK (~((uintptr_t)SINGLE_CHILD_TAG))
|
||||||
#define SINGLE_CHILD_P(x) (((uintptr_t)x) & SINGLE_CHILD_TAG)
|
#define SINGLE_CHILD_P(x) ((uintptr_t)(x) & SINGLE_CHILD_TAG)
|
||||||
#define SINGLE_CHILD(x) (rb_shape_t *)((uintptr_t)x & SINGLE_CHILD_MASK)
|
#define SINGLE_CHILD(x) (rb_shape_t *)((uintptr_t)(x) & SINGLE_CHILD_MASK)
|
||||||
#define ANCESTOR_CACHE_THRESHOLD 10
|
#define ANCESTOR_CACHE_THRESHOLD 10
|
||||||
#define MAX_SHAPE_ID (SHAPE_BUFFER_SIZE - 1)
|
#define MAX_SHAPE_ID (SHAPE_BUFFER_SIZE - 1)
|
||||||
#define ANCESTOR_SEARCH_MAX_DEPTH 2
|
#define ANCESTOR_SEARCH_MAX_DEPTH 2
|
||||||
|
|
Загрузка…
Ссылка в новой задаче