summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-31 06:17:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-31 06:17:45 +0000
commit1a192e2b29e9a7fa91632f1fbbffefb3ecdd1b63 (patch)
tree43b394fdba488a790c9a7ad7f0016ff6ffd69a2b
parent7981720812b73175c27a90d1d653c5e127e439ff (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--include/ruby.h20
-rw-r--r--include/ruby/mvm.h18
-rw-r--r--main.c3
-rw-r--r--vm_core.h8
5 files changed, 48 insertions, 6 deletions
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 <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 */
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 <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
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 <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;