let the .bss section initialize static variables
ISO/IEC 9899:1999 section 6.7.8 specifies the values of static storage which are not explicitly initialized. According to that these initializers can be omitted. Doing so improvoes future compatibility against addition / deletion of the fields of this struct.
This commit is contained in:
parent
6ff1250739
commit
7c07300491
@ -2395,12 +2395,12 @@ RUBY_FUNC_NONNULL(1, bool rb_method_basic_definition_p_with_cc(struct rb_call_da
|
|||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# define rb_funcallv(recv, mid, argc, argv) \
|
# define rb_funcallv(recv, mid, argc, argv) \
|
||||||
__extension__({ \
|
__extension__({ \
|
||||||
static struct rb_call_data rb_funcallv_data = { { 0, }, { 0, }, }; \
|
static struct rb_call_data rb_funcallv_data; \
|
||||||
rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \
|
rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \
|
||||||
})
|
})
|
||||||
# define rb_method_basic_definition_p(klass, mid) \
|
# define rb_method_basic_definition_p(klass, mid) \
|
||||||
__extension__({ \
|
__extension__({ \
|
||||||
static struct rb_call_data rb_mbdp = { { 0, }, { 0, }, }; \
|
static struct rb_call_data rb_mbdp; \
|
||||||
(klass == Qfalse) ? /* hidden object cannot be overridden */ true : \
|
(klass == Qfalse) ? /* hidden object cannot be overridden */ true : \
|
||||||
rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); \
|
rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); \
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user