[前][次][番号順一覧][スレッド一覧]

ruby-changes:9303

From: nobu <ko1@a...>
Date: Wed, 17 Dec 2008 18:01:08 +0900 (JST)
Subject: [ruby-changes:9303] Ruby:r20841 (mvm): * inits.c (rb_vm_call_inits): no longer passes current vm.

nobu	2008-12-17 18:00:28 +0900 (Wed, 17 Dec 2008)

  New Revision: 20841

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20841

  Log:
    * inits.c (rb_vm_call_inits): no longer passes current vm.

  Modified files:
    branches/mvm/ChangeLog
    branches/mvm/array.c
    branches/mvm/bignum.c
    branches/mvm/common.mk
    branches/mvm/compar.c
    branches/mvm/complex.c
    branches/mvm/cont.c
    branches/mvm/dir.c
    branches/mvm/dmyext.c
    branches/mvm/encoding.c
    branches/mvm/enum.c
    branches/mvm/enumerator.c
    branches/mvm/error.c
    branches/mvm/eval.c
    branches/mvm/eval_jump.c
    branches/mvm/file.c
    branches/mvm/gc.c
    branches/mvm/hash.c
    branches/mvm/include/ruby/public_object.h
    branches/mvm/inits.c
    branches/mvm/io.c
    branches/mvm/iseq.c
    branches/mvm/load.c
    branches/mvm/marshal.c
    branches/mvm/math.c
    branches/mvm/numeric.c
    branches/mvm/object.c
    branches/mvm/pack.c
    branches/mvm/parse.y
    branches/mvm/proc.c
    branches/mvm/process.c
    branches/mvm/random.c
    branches/mvm/range.c
    branches/mvm/rational.c
    branches/mvm/re.c
    branches/mvm/ruby.c
    branches/mvm/signal.c
    branches/mvm/string.c
    branches/mvm/struct.c
    branches/mvm/thread.c
    branches/mvm/time.c
    branches/mvm/transcode.c
    branches/mvm/variable.c
    branches/mvm/version.c
    branches/mvm/version.h
    branches/mvm/vm.c

Index: mvm/complex.c
===================================================================
--- mvm/complex.c	(revision 20840)
+++ mvm/complex.c	(revision 20841)
@@ -1403,7 +1403,7 @@
 }
 
 void
-InitVM_Complex(ruby_vm_t *vm)
+InitVM_Complex(void)
 {
     assert(fprintf(stderr, "assert() is now active\n"));
 
Index: mvm/array.c
===================================================================
--- mvm/array.c	(revision 20840)
+++ mvm/array.c	(revision 20841)
@@ -3775,7 +3775,7 @@
 }
 
 void
-InitVM_Array(ruby_vm_t *vm)
+InitVM_Array(void)
 {
     rb_cArray  = rb_define_class("Array", rb_cObject);
     rb_include_module(rb_cArray, rb_mEnumerable);
Index: mvm/encoding.c
===================================================================
--- mvm/encoding.c	(revision 20840)
+++ mvm/encoding.c	(revision 20841)
@@ -1283,7 +1283,7 @@
 }
 
 void
-InitVM_Encoding(ruby_vm_t *vm)
+InitVM_Encoding(void)
 {
     VALUE list;
     int i;
Index: mvm/math.c
===================================================================
--- mvm/math.c	(revision 20840)
+++ mvm/math.c	(revision 20841)
@@ -697,7 +697,7 @@
 }
 
 void
-InitVM_Math(ruby_vm_t *vm)
+InitVM_Math(void)
 {
     rb_mMath = rb_define_module("Math");
 
Index: mvm/time.c
===================================================================
--- mvm/time.c	(revision 20840)
+++ mvm/time.c	(revision 20841)
@@ -2387,7 +2387,7 @@
 }
 
 void
-InitVM_Time(ruby_vm_t *vm)
+InitVM_Time(void)
 {
     rb_cTime = rb_define_class("Time", rb_cObject);
     rb_include_module(rb_cTime, rb_mComparable);
Index: mvm/include/ruby/public_object.h
===================================================================
--- mvm/include/ruby/public_object.h	(revision 20840)
+++ mvm/include/ruby/public_object.h	(revision 20841)
@@ -1,10 +1,6 @@
 #ifndef RUBY_PUBLIC_OBJECT_H
 #define RUBY_PUBLIC_OBJECT_H 1
 
-#include "ruby/vm.h"
-
-
-
 VALUE *rb_vm_specific_ptr(int key);
 
 enum ruby_public_object_vmkey {
Index: mvm/re.c
===================================================================
--- mvm/re.c	(revision 20840)
+++ mvm/re.c	(revision 20841)
@@ -3358,7 +3358,7 @@
 }
 
 void
-InitVM_Regexp(ruby_vm_t *vm)
+InitVM_Regexp(void)
 {
     rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError);
 
Index: mvm/ChangeLog
===================================================================
--- mvm/ChangeLog	(revision 20840)
+++ mvm/ChangeLog	(revision 20841)
@@ -1,3 +1,7 @@
+Wed Dec 17 18:00:15 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* inits.c (rb_vm_call_inits): no longer passes current vm.
+
 Wed Dec 10 16:03:36 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* signal.c (ruby_install_altstack): does nothing unless using
Index: mvm/enumerator.c
===================================================================
--- mvm/enumerator.c	(revision 20840)
+++ mvm/enumerator.c	(revision 20841)
@@ -822,7 +822,7 @@
 }
 
 void
-InitVM_Enumerator(ruby_vm_t *vm)
+InitVM_Enumerator(void)
 {
     rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
     rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
Index: mvm/variable.c
===================================================================
--- mvm/variable.c	(revision 20840)
+++ mvm/variable.c	(revision 20841)
@@ -14,6 +14,7 @@
 #include "ruby/ruby.h"
 #include "ruby/st.h"
 #include "ruby/util.h"
+#include "ruby/vm.h"
 #include "vm_core.h"
 #include "node.h"
 
@@ -31,8 +32,9 @@
 }
 
 void
-InitVM_var_tables(ruby_vm_t *vm)
+InitVM_var_tables(void)
 {
+    rb_vm_t *vm = GET_VM();
     vm->mark_object_ary = rb_ary_new();
     vm->global_tbl = st_init_numtable();
 }
Index: mvm/iseq.c
===================================================================
--- mvm/iseq.c	(revision 20840)
+++ mvm/iseq.c	(revision 20841)
@@ -1429,7 +1429,7 @@
 }
 
 void
-InitVM_ISeq(ruby_vm_t *vm)
+InitVM_ISeq(void)
 {
     /* declare ::VM::InstructionSequence */
     rb_cISeq = rb_define_class_under(rb_cRubyVM, "InstructionSequence", rb_cObject);
Index: mvm/enum.c
===================================================================
--- mvm/enum.c	(revision 20840)
+++ mvm/enum.c	(revision 20841)
@@ -1813,7 +1813,7 @@
 }
 
 void
-InitVM_Enumerable(ruby_vm_t *vm)
+InitVM_Enumerable(void)
 {
     rb_mEnumerable = rb_define_module("Enumerable");
 
Index: mvm/string.c
===================================================================
--- mvm/string.c	(revision 20840)
+++ mvm/string.c	(revision 20841)
@@ -7094,7 +7094,7 @@
 }
 
 void
-InitVM_String(ruby_vm_t *vm)
+InitVM_String(void)
 {
     rb_cString  = rb_define_class("String", rb_cObject);
     rb_include_module(rb_cString, rb_mComparable);
Index: mvm/object.c
===================================================================
--- mvm/object.c	(revision 20840)
+++ mvm/object.c	(revision 20841)
@@ -2467,7 +2467,7 @@
 }
 
 void
-InitVM_Object(ruby_vm_t *vm)
+InitVM_Object(void)
 {
     VALUE metaclass;
 
Index: mvm/io.c
===================================================================
--- mvm/io.c	(revision 20840)
+++ mvm/io.c	(revision 20841)
@@ -13,6 +13,7 @@
 
 #include "ruby/ruby.h"
 #include "ruby/io.h"
+#include "ruby/vm.h"
 #include "eval_intern.h"
 #include <ctype.h>
 #include <errno.h>
@@ -82,7 +83,7 @@
 #endif
 
 extern void Init_File(void);
-extern void InitVM_File(rb_vm_t *);
+extern void InitVM_File(void);
 
 #ifdef __BEOS__
 # ifndef NOFILE
@@ -8558,7 +8559,7 @@
 }
 
 void
-InitVM_IO(ruby_vm_t *vm)
+InitVM_IO(void)
 {
 #undef rb_intern
 #define rb_intern(str) rb_intern_const(str)
@@ -8822,7 +8823,7 @@
     atexit(pipe_atexit);
 #endif
 
-    InitVM_File(vm);
+    InitVM_File();
 
     rb_define_method(rb_cFile, "initialize",  rb_file_initialize, -1);
 
Index: mvm/dmyext.c
===================================================================
--- mvm/dmyext.c	(revision 20840)
+++ mvm/dmyext.c	(revision 20841)
@@ -6,6 +6,6 @@
 }
 
 void
-InitVM_ext(ruby_vm_t *vm)
+InitVM_ext(void)
 {
 }
Index: mvm/pack.c
===================================================================
--- mvm/pack.c	(revision 20840)
+++ mvm/pack.c	(revision 20841)
@@ -2187,7 +2187,7 @@
 }
 
 void
-InitVM_pack(ruby_vm_t *vm)
+InitVM_pack(void)
 {
     rb_define_method(rb_cArray, "pack", pack_pack, 1);
     rb_define_method(rb_cString, "unpack", pack_unpack, 1);
Index: mvm/load.c
===================================================================
--- mvm/load.c	(revision 20840)
+++ mvm/load.c	(revision 20841)
@@ -680,10 +680,11 @@
 }
 
 void
-InitVM_load(ruby_vm_t *vm)
+InitVM_load(void)
 {
     static const char var_load_path[] = "$:";
     ID id_load_path = rb_intern2(var_load_path, sizeof(var_load_path)-1);
+    rb_vm_t *vm = GET_VM();
 
     rb_define_hooked_variable(var_load_path, (VALUE*)vm, load_path_getter, 0);
     rb_alias_variable(rb_intern("$-I"), id_load_path);
Index: mvm/range.c
===================================================================
--- mvm/range.c	(revision 20840)
+++ mvm/range.c	(revision 20841)
@@ -918,7 +918,7 @@
 }
 
 void
-InitVM_Range(ruby_vm_t *vm)
+InitVM_Range(void)
 {
     rb_cRange = rb_struct_define_without_accessor(
         "Range", rb_cObject, range_alloc,
Index: mvm/proc.c
===================================================================
--- mvm/proc.c	(revision 20840)
+++ mvm/proc.c	(revision 20841)
@@ -1859,7 +1859,7 @@
 }
 
 void
-InitVM_Proc(ruby_vm_t *vm)
+InitVM_Proc(void)
 {
     /* Proc */
     rb_cProc = rb_define_class("Proc", rb_cObject);
@@ -1988,7 +1988,7 @@
 }
 
 void
-InitVM_Binding(ruby_vm_t *vm)
+InitVM_Binding(void)
 {
     rb_cBinding = rb_define_class("Binding", rb_cObject);
     rb_undef_alloc_func(rb_cBinding);
Index: mvm/thread.c
===================================================================
--- mvm/thread.c	(revision 20840)
+++ mvm/thread.c	(revision 20841)
@@ -47,6 +47,7 @@
 #include "eval_intern.h"
 #include "gc.h"
 #include "ruby/util.h"
+#include "ruby/vm.h"
 
 #ifndef USE_NATIVE_THREAD_PRIORITY
 #define USE_NATIVE_THREAD_PRIORITY 0
@@ -3726,7 +3727,7 @@
 }
 
 void
-InitVM_Thread(ruby_vm_t *vm)
+InitVM_Thread(void)
 {
     VALUE cThGroup;
 
Index: mvm/common.mk
===================================================================
--- mvm/common.mk	(revision 20840)
+++ mvm/common.mk	(revision 20841)
@@ -444,7 +444,7 @@
 
 RUBY_H_INCLUDES    = {$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}defines.h \
 		     {$(VPATH)}intern.h {$(VPATH)}missing.h \
-		     {$(VPATH)}public_object.h {$(VPATH)}vm.h
+		     {$(VPATH)}public_object.h
 ENCODING_H_INCLUDES= {$(VPATH)}encoding.h {$(VPATH)}oniguruma.h
 ID_H_INCLUDES      = {$(VPATH)}id.h
 VM_CORE_H_INCLUDES = {$(VPATH)}vm_core.h {$(VPATH)}vm_opts.h \
@@ -470,7 +470,7 @@
 enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES)
 error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}known_errors.inc $(RUBY_H_INCLUDES) \
   $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h
-eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h \
+eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h {$(VPATH)}vm.h \
   $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_error.c \
   {$(VPATH)}eval_jump.c {$(VPATH)}debug.h \
   {$(VPATH)}iseq.h
@@ -482,11 +482,11 @@
 gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
   {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
   {$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
-  {$(VPATH)}debug.h
+  {$(VPATH)}vm.h {$(VPATH)}debug.h
 hash.$(OBJEXT): {$(VPATH)}hash.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h
 inits.$(OBJEXT): {$(VPATH)}inits.c $(RUBY_H_INCLUDES)
 io.$(OBJEXT): {$(VPATH)}io.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
-  {$(VPATH)}util.h $(ENCODING_H_INCLUDES)
+  {$(VPATH)}util.h {$(VPATH)}vm.h $(ENCODING_H_INCLUDES)
 main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}debug.h \
   {$(VPATH)}node.h
 marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
@@ -529,7 +529,7 @@
   {$(VPATH)}regenc.h {$(VPATH)}oniguruma.h $(RUBY_H_INCLUDES)
 ruby.$(OBJEXT): {$(VPATH)}ruby.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
   $(ENCODING_H_INCLUDES) {$(VPATH)}eval_intern.h $(VM_CORE_H_INCLUDES) \
-  {$(VPATH)}dln.h {$(VPATH)}debug.h
+  {$(VPATH)}vm.h {$(VPATH)}dln.h {$(VPATH)}debug.h
 safe.$(OBJEXT): {$(VPATH)}safe.c $(RUBY_H_INCLUDES) \
   $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h
 signal.$(OBJEXT): {$(VPATH)}signal.c $(RUBY_H_INCLUDES) \
@@ -544,7 +544,7 @@
 string.$(OBJEXT): {$(VPATH)}string.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
   {$(VPATH)}regex.h $(ENCODING_H_INCLUDES)
 struct.$(OBJEXT): {$(VPATH)}struct.c $(RUBY_H_INCLUDES)
-thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h \
+thread.$(OBJEXT): {$(VPATH)}thread.c {$(VPATH)}eval_intern.h {$(VPATH)}vm.h \
   $(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \
   {$(VPATH)}debug.h {$(VPATH)}thread_$(THREAD_MODEL).c
 transcode.$(OBJEXT): {$(VPATH)}transcode.c $(RUBY_H_INCLUDES) \
@@ -556,7 +556,7 @@
   $(ENCODING_H_INCLUDES)
 util.$(OBJEXT): {$(VPATH)}util.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h
 variable.$(OBJEXT): {$(VPATH)}variable.c $(RUBY_H_INCLUDES) \
-  {$(VPATH)}node.h {$(VPATH)}util.h
+  {$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}vm.h
 version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) \
   {$(VPATH)}version.h $(srcdir)/revision.h
 
Index: mvm/dir.c
===================================================================
--- mvm/dir.c	(revision 20840)
+++ mvm/dir.c	(revision 20841)
@@ -2371,7 +2371,7 @@
 }
 
 void
-InitVM_Dir(ruby_vm_t *vm)
+InitVM_Dir(void)
 {
     rb_cDir = rb_define_class("Dir", rb_cObject);
 
Index: mvm/eval_jump.c
===================================================================
--- mvm/eval_jump.c	(revision 20840)
+++ mvm/eval_jump.c	(revision 20841)
@@ -126,7 +126,7 @@
 }
 
 void
-InitVM_jump(ruby_vm_t *vm)
+InitVM_jump(void)
 {
     rb_define_global_function("at_exit", rb_f_at_exit, 0);
 }
Index: mvm/struct.c
===================================================================
--- mvm/struct.c	(revision 20840)
+++ mvm/struct.c	(revision 20841)
@@ -879,7 +879,7 @@
 }
 
 void
-InitVM_Struct(ruby_vm_t *vm)
+InitVM_Struct(void)
 {
     rb_cStruct = rb_define_class("Struct", rb_cObject);
     rb_include_module(rb_cStruct, rb_mEnumerable);
Index: mvm/eval.c
===================================================================
--- mvm/eval.c	(revision 20840)
+++ mvm/eval.c	(revision 20841)
@@ -13,6 +13,7 @@
 
 #include "eval_intern.h"
 #include "iseq.h"
+#include "ruby/vm.h"
 
 #define exception_error rb_errReenterError
 
@@ -33,9 +34,9 @@
 void Init_heap(void);
 void Init_ext(void);
 void Init_BareVM(void);
-void rb_vm_call_inits(rb_vm_t *vm);
-void InitVM_heap(rb_vm_t *vm);
-void InitVM_ext(rb_vm_t *vm);
+void rb_vm_call_inits(void);
+void InitVM_heap(void);
+void InitVM_ext(void);
 void ruby_vm_prog_init(rb_vm_t *vm);
 
 VALUE ruby_vm_process_options(rb_vm_t *vm, int argc, char **argv);
@@ -79,7 +80,7 @@
 {
     int state;
 
-    InitVM_heap(vm);
+    InitVM_heap();
 
     PUSH_TAG();
     if ((state = EXEC_TAG()) == 0) {
@@ -92,7 +93,7 @@
 	error_print();
 	return state;
     }
-    GET_VM()->running = 1;
+    vm->running = 1;
     return 0;
 }
 
@@ -1156,7 +1157,7 @@
 }
 
 void
-InitVM_eval(ruby_vm_t *vm)
+InitVM_eval(void)
 {
     rb_define_virtual_variable("$@", errat_getter, errat_setter);
     rb_define_virtual_variable("$!", errinfo_getter, 0);
Index: mvm/gc.c
===================================================================
--- mvm/gc.c	(revision 20840)
+++ mvm/gc.c	(revision 20841)
@@ -16,6 +16,7 @@
 #include "ruby/re.h"
 #include "ruby/io.h"
 #include "ruby/util.h"
+#include "ruby/vm.h"
 #include "eval_intern.h"
 #include "vm_core.h"
 #include "gc.h"
@@ -2084,7 +2085,7 @@
 }
 
 void
-InitVM_heap(ruby_vm_t *vm)
+InitVM_heap(void)
 {
 #if !(defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE)
     init_heap(vm->objspace);
@@ -2808,7 +2809,7 @@
 }
 
 void
-InitVM_GC(ruby_vm_t *vm)
+InitVM_GC(void)
 {
     VALUE rb_mObSpace;
     VALUE rb_mProfiler;
Index: mvm/parse.y
===================================================================
--- mvm/parse.y	(revision 20840)
+++ mvm/parse.y	(revision 20841)
@@ -9211,13 +9211,13 @@
 }
 
 void
-InitVM_sym(rb_vm_t *vm)
+InitVM_sym(void)
 {
     struct ivar_symbols *isym = ALLOC(struct ivar_symbols);
     VALUE iw = Data_Wrap_Struct(0, ivar2_mark, ivar2_free, isym);
     isym->ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000);
     isym->id_ivar2 = st_init_numtable_with_size(1000);
-    *(VALUE *)ruby_vm_specific_ptr(vm, rb_vmkey_ivar_symbols) = iw;
+    *rb_vm_specific_ptr(rb_vmkey_ivar_symbols) = iw;
 }
 
 void
@@ -10349,7 +10349,7 @@
 }
 
 void
-InitVM_ripper(rb_vm_t *vm)
+InitVM_ripper(void)
 {
     VALUE Ripper;
 
Index: mvm/process.c
===================================================================
--- mvm/process.c	(revision 20840)
+++ mvm/process.c	(revision 20841)
@@ -5222,7 +5222,7 @@
 }
 
 void
-InitVM_process(ruby_vm_t *vm)
+InitVM_process(void)
 {
     VALUE rb_mProcUID;
     VALUE rb_mProcGID;
Index: mvm/hash.c
===================================================================
--- mvm/hash.c	(revision 20840)
+++ mvm/hash.c	(revision 20841)
@@ -2572,7 +2572,7 @@
 }
 
 void
-InitVM_Hash(ruby_vm_t *vm)
+InitVM_Hash(void)
 {
     rb_cHash = rb_define_class("Hash", rb_cObject);
 
Index: mvm/error.c
===================================================================
--- mvm/error.c	(revision 20840)
+++ mvm/error.c	(revision 20841)
@@ -1002,7 +1002,7 @@
 }
 
 void
-InitVM_Exception(ruby_vm_t *vm)
+InitVM_Exception(void)
 {
     rb_eException   = rb_define_class("Exception", rb_cObject);
     rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
@@ -1170,7 +1170,7 @@
 }
 
 void
-InitVM_syserr(ruby_vm_t *vm)
+InitVM_syserr(void)
 {
     rb_eNOERROR = set_syserr(0, "NOERROR");
 #include "known_errors.inc"
Index: mvm/numeric.c
===================================================================
--- mvm/numeric.c	(revision 20840)
+++ mvm/numeric.c	(revision 20841)
@@ -3067,7 +3067,7 @@
 }
 
 void
-InitVM_Numeric(ruby_vm_t *vm)
+InitVM_Numeric(void)
 {
     rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
     rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
Index: mvm/cont.c
===================================================================
--- mvm/cont.c	(revision 20840)
+++ mvm/cont.c	(revision 20841)
@@ -874,7 +874,7 @@
 }
 
 void
-InitVM_Cont(ruby_vm_t *vm)
+InitVM_Cont(void)
 {
     rb_cFiber = rb_define_class("Fiber", rb_cObject);
     rb_define_alloc_func(rb_cFiber, fiber_alloc);
Index: mvm/compar.c
===================================================================
--- mvm/compar.c	(revision 20840)
+++ mvm/compar.c	(revision 20841)
@@ -203,7 +203,7 @@
 }
 
 void
-InitVM_Comparable(ruby_vm_t *vm)
+InitVM_Comparable(void)
 {
     rb_mComparable = rb_define_module("Comparable");
     rb_define_method(rb_mComparable, "==", cmp_equal, 1);
Index: mvm/vm.c
===================================================================
--- mvm/vm.c	(revision 20840)
+++ mvm/vm.c	(revision 20841)
@@ -1766,7 +1766,7 @@
 }
 
 void
-InitVM_VM(ruby_vm_t *vm)
+InitVM_VM(void)
 {
     VALUE opts;
     VALUE klass;
@@ -1938,8 +1938,10 @@
 }
 
 void
-InitVM_top_self(ruby_vm_t *vm)
+InitVM_top_self(void)
 {
+    rb_vm_t *vm = GET_VM();
+
     vm->top_self = rb_obj_alloc(rb_cObject);
     rb_define_singleton_method(rb_vm_top_self(), "to_s", main_to_s, 0);
 
Index: mvm/version.c
===================================================================
--- mvm/version.c	(revision 20840)
+++ mvm/version.c	(revision 20841)
@@ -30,7 +30,7 @@
 }
 
 void
-InitVM_version(ruby_vm_t *vm)
+InitVM_version(void)
 {
     rb_define_global_const("RUBY_VERSION", MKSTR(version));
     rb_define_global_const("RUBY_RELEASE_DATE", MKSTR(release_date));
Index: mvm/inits.c
===================================================================
--- mvm/inits.c	(revision 20840)
+++ mvm/inits.c	(revision 20841)
@@ -16,8 +16,8 @@
 #include "inits.c"
 #define CALL(n) {void Init_##n(void); Init_##n();}
 #else
-#define CALL(n) {void InitVM_##n(ruby_vm_t *); InitVM_##n(vm);}
-#define rb_call_inits(void) rb_vm_call_inits(ruby_vm_t *vm)
+#define CALL(n) {void InitVM_##n(void); InitVM_##n();}
+#define rb_call_inits(void) rb_vm_call_inits(void)
 #endif
 
 void
Index: mvm/version.h
===================================================================
--- mvm/version.h	(revision 20840)
+++ mvm/version.h	(revision 20841)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_RELEASE_DATE "2008-12-10"
+#define RUBY_RELEASE_DATE "2008-12-17"
 #define RUBY_VERSION_CODE 191
-#define RUBY_RELEASE_CODE 20081210
+#define RUBY_RELEASE_CODE 20081217
 #define RUBY_PATCHLEVEL 5000
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 10
+#define RUBY_RELEASE_DAY 17
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: mvm/ruby.c
===================================================================
--- mvm/ruby.c	(revision 20840)
+++ mvm/ruby.c	(revision 20841)
@@ -17,6 +17,7 @@
 #endif
 #include "ruby/ruby.h"
 #include "ruby/encoding.h"
+#include "ruby/vm.h"
 #include "eval_intern.h"
 #include "dln.h"
 #include <stdio.h>
Index: mvm/bignum.c
===================================================================
--- mvm/bignum.c	(revision 20840)
+++ mvm/bignum.c	(revision 20841)
@@ -2675,7 +2675,7 @@
 }
 
 void
-InitVM_Bignum(ruby_vm_t *vm)
+InitVM_Bignum(void)
 {
     rb_cBignum = rb_define_class("Bignum", rb_cInteger);
 
Index: mvm/marshal.c
===================================================================
--- mvm/marshal.c	(revision 20840)
+++ mvm/marshal.c	(revision 20841)
@@ -1723,7 +1723,7 @@
 }
 
 void
-InitVM_marshal(ruby_vm_t *vm)
+InitVM_marshal(void)
 {
     VALUE rb_mMarshal = rb_define_module("Marshal");
 
Index: mvm/rational.c
===================================================================
--- mvm/rational.c	(revision 20840)
+++ mvm/rational.c	(revision 20841)
@@ -1515,7 +1515,7 @@
 }
 
 void
-InitVM_Rational(ruby_vm_t *vm)
+InitVM_Rational(void)
 {
     assert(fprintf(stderr, "assert() is now active\n"));
 
Index: mvm/signal.c
===================================================================
--- mvm/signal.c	(revision 20840)
+++ mvm/signal.c	(revision 20841)
@@ -1157,7 +1157,7 @@
 }
 
 void
-InitVM_signal(ruby_vm_t *vm)
+InitVM_signal(void)
 {
 #ifndef MACOS_UNUSE_SIGNAL
     VALUE mSignal = rb_define_module("Signal");
Index: mvm/file.c
===================================================================
--- mvm/file.c	(revision 20840)
+++ mvm/file.c	(revision 20841)
@@ -4696,7 +4696,7 @@
 }
 
 void
-InitVM_File(ruby_vm_t *vm)
+InitVM_File(void)
 {
     VALUE separator;
 
Index: mvm/random.c
===================================================================
--- mvm/random.c	(revision 20840)
+++ mvm/random.c	(revision 20841)
@@ -545,17 +545,17 @@
 }
 
 void
-InitVM_RandomSeed(ruby_vm_t *vm)
+InitVM_RandomSeed(void)
 {
 }
 
 static void
-InitVM_RandomSeed2(ruby_vm_t *vm)
+InitVM_RandomSeed2(void)
 {
     struct Random *r;
     VALUE rv = Data_Make_Struct(rb_cData, struct Random, random_mark, -1, r);
 
-    *(VALUE *)ruby_vm_specific_ptr(vm, vmkey_default_mt) = rv;
+    *rb_vm_specific_ptr(vmkey_default_mt) = rv;
     fill_random_seed(r->seed.initial);
     init_by_array(&r->mt, r->seed.initial, DEFAULT_SEED_CNT);
     r->seed.value = make_seed_value(r->seed.initial);
@@ -576,9 +576,9 @@
 }
 
 void
-InitVM_Random(ruby_vm_t *vm)
+InitVM_Random(void)
 {
-    InitVM_RandomSeed2(vm);
+    InitVM_RandomSeed2();
     rb_define_global_function("srand", rb_f_srand, -1);
     rb_define_global_function("rand", rb_f_rand, -1);
 }
Index: mvm/transcode.c
===================================================================
--- mvm/transcode.c	(revision 20840)
+++ mvm/transcode.c	(revision 20841)
@@ -4017,7 +4017,7 @@
 }
 
 void
-InitVM_transcode(ruby_vm_t *vm)
+InitVM_transcode(void)
 {
     rb_eUndefinedConversionError = rb_define_class_under(rb_cEncoding, "UndefinedConversionError", rb_eEncodingError);
     rb_eInvalidByteSequenceError = rb_define_class_under(rb_cEncoding, "InvalidByteSequenceError", rb_eEncodingError);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]