aboutsummaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-19 13:25:53 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-19 13:25:53 +0900
commitb6833ff50d2c7188e615839284263cf58cca48b7 (patch)
tree0752758729f7ee55da611f356b34fe72c23a30ec /vm_core.h
parenteeb178dc1fe69b5fbf7194d75c0f6ac7e02d4de1 (diff)
downloadruby-b6833ff50d2c7188e615839284263cf58cca48b7.tar.gz
Get rid of redefinition of `rb_execution_context_t`
Regardless of the order to include "vm_core.h" and "builtin.h".
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/vm_core.h b/vm_core.h
index 754ce981e6..76757dce66 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -827,7 +827,7 @@ typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3];
typedef struct rb_fiber_struct rb_fiber_t;
-typedef struct rb_execution_context_struct {
+struct rb_execution_context_struct {
/* execution information */
VALUE *vm_stack; /* must free, must mark */
size_t vm_stack_size; /* size in word (byte size / sizeof(VALUE)) */
@@ -876,7 +876,12 @@ typedef struct rb_execution_context_struct {
size_t stack_maxsize;
RUBY_ALIGNAS(SIZEOF_VALUE) jmp_buf regs;
} machine;
-} rb_execution_context_t;
+};
+
+#ifndef rb_execution_context_t
+typedef struct rb_execution_context_struct rb_execution_context_t;
+#define rb_execution_context_t rb_execution_context_t
+#endif
// for builtin.h
#define VM_CORE_H_EC_DEFINED 1