diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/ruby.h | 20 | ||||
-rw-r--r-- | include/ruby/mvm.h | 18 | ||||
-rw-r--r-- | main.c | 3 | ||||
-rw-r--r-- | vm_core.h | 8 |
5 files changed, 48 insertions, 6 deletions
@@ -1,3 +1,8 @@ +Sat May 31 15:17:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * include/ruby/mvm.h: new header file for MVM, and moved rb_vm_t and + rb_thread_t from vm_core.h. + Sat May 31 12:02:23 2008 Tanaka Akira <akr@fsij.org> * test/ruby/envutil.rb (assert_normal_exit): show pid when fail. diff --git a/include/ruby.h b/include/ruby.h index b1fb46c897..cbe5aaa3bf 100644 --- a/include/ruby.h +++ b/include/ruby.h @@ -1 +1,21 @@ +/********************************************************************** + + ruby/mvm.h - + + $Author$ + created at: Sun 10 12:06:15 Jun JST 2007 + + Copyright (C) 2007-2008 Yukihiro Matsumoto + +**********************************************************************/ + +#ifndef RUBY_H +#define RUBY_H 1 + #include <ruby/ruby.h> +#if RUBY_VM +#include <ruby/mvm.h> +#endif + +extern void ruby_set_debug_option(const char *); +#endif /* RUBY_H */ diff --git a/include/ruby/mvm.h b/include/ruby/mvm.h new file mode 100644 index 0000000000..6b6a2f5232 --- /dev/null +++ b/include/ruby/mvm.h @@ -0,0 +1,18 @@ +/********************************************************************** + + ruby/mvm.h - + + $Author$ + created at: Sat May 31 15:17:36 2008 + + Copyright (C) 2008 Yukihiro Matsumoto + +**********************************************************************/ + +#ifndef RUBY_MVM_H +#define RUBY_MVM_H 1 + +typedef struct rb_vm_struct rb_vm_t; +typedef struct rb_thread_struct rb_thread_t; + +#endif /* RUBY_MVM_H */ @@ -10,7 +10,7 @@ **********************************************************************/ #undef RUBY_EXPORT -#include "ruby/ruby.h" +#include "ruby.h" #ifdef HAVE_LOCALE_H #include <locale.h> #endif @@ -21,7 +21,6 @@ int main(int argc, char **argv, char **envp) { #ifdef RUBY_DEBUG_ENV - extern void ruby_set_debug_option(const char *); ruby_set_debug_option(getenv("RUBY_DEBUG")); #endif #ifdef HAVE_LOCALE_H @@ -17,6 +17,7 @@ #include <setjmp.h> #include "ruby/ruby.h" +#include "ruby/mvm.h" #include "ruby/signal.h" #include "ruby/st.h" #include "ruby/node.h" @@ -285,7 +286,8 @@ typedef struct rb_iseq_struct rb_iseq_t; #define GetVMPtr(obj, ptr) \ GetCoreDataFromValue(obj, rb_vm_t, ptr) -typedef struct rb_vm_struct { +struct rb_vm_struct +{ VALUE self; rb_thread_lock_t global_interpreter_lock; @@ -320,7 +322,7 @@ typedef struct rb_vm_struct { #if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE struct rb_objspace *objspace; #endif -} rb_vm_t; +}; typedef struct { VALUE *pc; /* cfp[0] */ @@ -378,8 +380,6 @@ struct rb_unblock_callback { void *arg; }; -typedef struct rb_thread_struct rb_thread_t; - struct rb_thread_struct { VALUE self; |