From 1a192e2b29e9a7fa91632f1fbbffefb3ecdd1b63 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 31 May 2008 06:17:45 +0000 Subject: * include/ruby/mvm.h: new header file for MVM, and moved rb_vm_t and rb_thread_t from vm_core.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ include/ruby.h | 20 ++++++++++++++++++++ include/ruby/mvm.h | 18 ++++++++++++++++++ main.c | 3 +-- vm_core.h | 8 ++++---- 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 include/ruby/mvm.h diff --git a/ChangeLog b/ChangeLog index 4f749a9439..abff4b1a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat May 31 15:17:36 2008 Nobuyoshi Nakada + + * 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 * 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 +#if RUBY_VM +#include +#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 */ diff --git a/main.c b/main.c index 455c181d16..c2120d257c 100644 --- a/main.c +++ b/main.c @@ -10,7 +10,7 @@ **********************************************************************/ #undef RUBY_EXPORT -#include "ruby/ruby.h" +#include "ruby.h" #ifdef HAVE_LOCALE_H #include #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 diff --git a/vm_core.h b/vm_core.h index f0fdafef2d..08c6449c78 100644 --- a/vm_core.h +++ b/vm_core.h @@ -17,6 +17,7 @@ #include #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; -- cgit v1.2.3