aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-11-05 13:46:08 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-11-05 13:46:08 +0900
commit7c07300491de502cd94e07fcbf9b30f2df31a0d5 (patch)
treebf27b383099553b51ef65575447992ca4bb08c81 /internal.h
parent6ff1250739c57ce7f234a2148d3f6214da01b7e5 (diff)
downloadruby-7c07300491de502cd94e07fcbf9b30f2df31a0d5.tar.gz
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.
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal.h b/internal.h
index 0c245c3d43..703dd57699 100644
--- a/internal.h
+++ b/internal.h
@@ -2395,12 +2395,12 @@ RUBY_FUNC_NONNULL(1, bool rb_method_basic_definition_p_with_cc(struct rb_call_da
#ifdef __GNUC__
# define rb_funcallv(recv, mid, argc, argv) \
__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); \
})
# define rb_method_basic_definition_p(klass, mid) \
__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 : \
rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); \
})