summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-03 18:33:59 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-09 09:52:46 +0900
commit98d099be7e6d0251a7909dfeed10b13f453cc0f4 (patch)
tree22911dad64f2173c1c6a74e7393cdd453283b566 /vm.c
parent4fbe86d0e22e06ecd4f79282fc66ddc40d963d60 (diff)
vm_empty_cc: fix MSVC compile error
Seems they do not allow compound literals for static variables. See https://github.com/ruby/ruby/runs/733735274
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3179
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index e243f0e..a6f8d92 100644
--- a/vm.c
+++ b/vm.c
@@ -386,7 +386,15 @@ rb_serial_t ruby_vm_global_method_state = 1;
rb_serial_t ruby_vm_global_constant_state = 1;
rb_serial_t ruby_vm_class_serial = 1;
-static const struct rb_callcache vm_empty_cc = VM_CC_ON_STACK(0, vm_call_general, { 0 }, 0);
+static const struct rb_callcache vm_empty_cc = {
+ .flags = T_IMEMO | (imemo_callcache << FL_USHIFT) | VM_CALLCACHE_UNMARKABLE,
+ .klass = Qfalse,
+ .cme_ = NULL,
+ .call_ = vm_call_general,
+ .aux_ = {
+ .v = Qfalse,
+ }
+};
static void thread_free(void *ptr);