Skip to content

Commit

Permalink
* inits.c (rb_vm_call_inits): let all InitVM functions use
Browse files Browse the repository at this point in the history
  ruby_vm_t instead of rb_vm_t.


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/mvm@20396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Nov 30, 2008
1 parent f0bd486 commit 7bcdd1f
Show file tree
Hide file tree
Showing 42 changed files with 53 additions and 48 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Sun Nov 30 15:26:44 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* inits.c (rb_vm_call_inits): let all InitVM functions use
ruby_vm_t instead of rb_vm_t.

Thu Nov 27 17:06:46 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* vm_core.h (rb_vm_t): moved back from include/ruby/vm.h again.
Expand Down
2 changes: 1 addition & 1 deletion array.c
Expand Up @@ -3775,7 +3775,7 @@ Init_Array(void)
}

void
InitVM_Array(rb_vm_t *vm)
InitVM_Array(ruby_vm_t *vm)
{
rb_cArray = rb_define_class("Array", rb_cObject);
rb_include_module(rb_cArray, rb_mEnumerable);
Expand Down
2 changes: 1 addition & 1 deletion bignum.c
Expand Up @@ -2675,7 +2675,7 @@ Init_Bignum(void)
}

void
InitVM_Bignum(rb_vm_t *vm)
InitVM_Bignum(ruby_vm_t *vm)
{
rb_cBignum = rb_define_class("Bignum", rb_cInteger);

Expand Down
2 changes: 1 addition & 1 deletion compar.c
Expand Up @@ -203,7 +203,7 @@ Init_Comparable(void)
}

void
InitVM_Comparable(rb_vm_t *vm)
InitVM_Comparable(ruby_vm_t *vm)
{
rb_mComparable = rb_define_module("Comparable");
rb_define_method(rb_mComparable, "==", cmp_equal, 1);
Expand Down
2 changes: 1 addition & 1 deletion complex.c
Expand Up @@ -1400,7 +1400,7 @@ Init_Complex(void)
}

void
InitVM_Complex(rb_vm_t *vm)
InitVM_Complex(ruby_vm_t *vm)
{
assert(fprintf(stderr, "assert() is now active\n"));

Expand Down
2 changes: 1 addition & 1 deletion cont.c
Expand Up @@ -860,7 +860,7 @@ Init_Cont(void)
}

void
InitVM_Cont(rb_vm_t *vm)
InitVM_Cont(ruby_vm_t *vm)
{
rb_cFiber = rb_define_class("Fiber", rb_cObject);
rb_undef_alloc_func(rb_cFiber);
Expand Down
2 changes: 1 addition & 1 deletion dir.c
Expand Up @@ -2371,7 +2371,7 @@ Init_Dir(void)
}

void
InitVM_Dir(rb_vm_t *vm)
InitVM_Dir(ruby_vm_t *vm)
{
rb_cDir = rb_define_class("Dir", rb_cObject);

Expand Down
2 changes: 1 addition & 1 deletion dmyext.c
Expand Up @@ -6,6 +6,6 @@ Init_ext(void)
}

void
InitVM_ext(rb_vm_t *vm)
InitVM_ext(ruby_vm_t *vm)
{
}
2 changes: 1 addition & 1 deletion encoding.c
Expand Up @@ -1283,7 +1283,7 @@ Init_Encoding(void)
}

void
InitVM_Encoding(rb_vm_t *vm)
InitVM_Encoding(ruby_vm_t *vm)
{
VALUE list;
int i;
Expand Down
2 changes: 1 addition & 1 deletion enum.c
Expand Up @@ -1813,7 +1813,7 @@ Init_Enumerable(void)
}

void
InitVM_Enumerable(rb_vm_t *vm)
InitVM_Enumerable(ruby_vm_t *vm)
{
rb_mEnumerable = rb_define_module("Enumerable");

Expand Down
2 changes: 1 addition & 1 deletion enumerator.c
Expand Up @@ -760,7 +760,7 @@ Init_Enumerator(void)
}

void
InitVM_Enumerator(rb_vm_t *vm)
InitVM_Enumerator(ruby_vm_t *vm)
{
rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
Expand Down
4 changes: 2 additions & 2 deletions error.c
Expand Up @@ -1002,7 +1002,7 @@ Init_Exception(void)
}

void
InitVM_Exception(rb_vm_t *vm)
InitVM_Exception(ruby_vm_t *vm)
{
rb_eException = rb_define_class("Exception", rb_cObject);
rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
Expand Down Expand Up @@ -1170,7 +1170,7 @@ void Init_syserr(void)
}

void
InitVM_syserr(rb_vm_t *vm)
InitVM_syserr(ruby_vm_t *vm)
{
rb_eNOERROR = set_syserr(0, "NOERROR");
#include "known_errors.inc"
Expand Down
2 changes: 1 addition & 1 deletion eval.c
Expand Up @@ -1156,7 +1156,7 @@ Init_eval(void)
}

void
InitVM_eval(rb_vm_t *vm)
InitVM_eval(ruby_vm_t *vm)
{
rb_define_virtual_variable("$@", errat_getter, errat_setter);
rb_define_virtual_variable("$!", errinfo_getter, 0);
Expand Down
2 changes: 1 addition & 1 deletion eval_jump.c
Expand Up @@ -126,7 +126,7 @@ Init_jump(void)
}

void
InitVM_jump(rb_vm_t *vm)
InitVM_jump(ruby_vm_t *vm)
{
rb_define_global_function("at_exit", rb_f_at_exit, 0);
}
2 changes: 1 addition & 1 deletion file.c
Expand Up @@ -4696,7 +4696,7 @@ Init_File(void)
}

void
InitVM_File(rb_vm_t *vm)
InitVM_File(ruby_vm_t *vm)
{
VALUE separator;

Expand Down
4 changes: 2 additions & 2 deletions gc.c
Expand Up @@ -2074,7 +2074,7 @@ Init_heap(void)
}

void
InitVM_heap(rb_vm_t *vm)
InitVM_heap(ruby_vm_t *vm)
{
#if !(defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE)
init_heap(vm->objspace);
Expand Down Expand Up @@ -2798,7 +2798,7 @@ Init_GC(void)
}

void
InitVM_GC(rb_vm_t *vm)
InitVM_GC(ruby_vm_t *vm)
{
VALUE rb_mObSpace;
VALUE rb_mProfiler;
Expand Down
2 changes: 1 addition & 1 deletion hash.c
Expand Up @@ -2572,7 +2572,7 @@ Init_Hash(void)
}

void
InitVM_Hash(rb_vm_t *vm)
InitVM_Hash(ruby_vm_t *vm)
{
rb_cHash = rb_define_class("Hash", rb_cObject);

Expand Down
4 changes: 2 additions & 2 deletions inits.c
Expand Up @@ -16,8 +16,8 @@
#include "inits.c"
#define CALL(n) {void Init_##n(void); Init_##n();}
#else
#define CALL(n) {void InitVM_##n(rb_vm_t *); InitVM_##n(vm);}
#define rb_call_inits(void) rb_vm_call_inits(rb_vm_t *vm)
#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)
#endif

void
Expand Down
2 changes: 1 addition & 1 deletion io.c
Expand Up @@ -8489,7 +8489,7 @@ Init_IO(void)
}

void
InitVM_IO(rb_vm_t *vm)
InitVM_IO(ruby_vm_t *vm)
{
#undef rb_intern
#define rb_intern(str) rb_intern_const(str)
Expand Down
2 changes: 1 addition & 1 deletion iseq.c
Expand Up @@ -1333,7 +1333,7 @@ Init_ISeq(void)
}

void
InitVM_ISeq(rb_vm_t *vm)
InitVM_ISeq(ruby_vm_t *vm)
{
/* declare ::VM::InstructionSequence */
rb_cISeq = rb_define_class_under(rb_cRubyVM, "InstructionSequence", rb_cObject);
Expand Down
2 changes: 1 addition & 1 deletion load.c
Expand Up @@ -684,7 +684,7 @@ Init_load()
}

void
InitVM_load(rb_vm_t *vm)
InitVM_load(ruby_vm_t *vm)
{
static const char var_load_path[] = "$:";
ID id_load_path = rb_intern2(var_load_path, sizeof(var_load_path)-1);
Expand Down
2 changes: 1 addition & 1 deletion main.c
Expand Up @@ -32,7 +32,7 @@ main(int argc, char **argv)

ruby_sysinit(&argc, &argv);
{
rb_vm_t *vm;
ruby_vm_t *vm;
int ret;

RUBY_INIT_STACK;
Expand Down
2 changes: 1 addition & 1 deletion marshal.c
Expand Up @@ -1723,7 +1723,7 @@ Init_marshal(void)
}

void
InitVM_marshal(rb_vm_t *vm)
InitVM_marshal(ruby_vm_t *vm)
{
VALUE rb_mMarshal = rb_define_module("Marshal");

Expand Down
2 changes: 1 addition & 1 deletion math.c
Expand Up @@ -697,7 +697,7 @@ Init_Math(void)
}

void
InitVM_Math(rb_vm_t *vm)
InitVM_Math(ruby_vm_t *vm)
{
rb_mMath = rb_define_module("Math");

Expand Down
2 changes: 1 addition & 1 deletion numeric.c
Expand Up @@ -3066,7 +3066,7 @@ Init_Numeric(void)
}

void
InitVM_Numeric(rb_vm_t *vm)
InitVM_Numeric(ruby_vm_t *vm)
{
rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
Expand Down
2 changes: 1 addition & 1 deletion object.c
Expand Up @@ -2467,7 +2467,7 @@ Init_Object(void)
}

void
InitVM_Object(rb_vm_t *vm)
InitVM_Object(ruby_vm_t *vm)
{
VALUE metaclass;

Expand Down
2 changes: 1 addition & 1 deletion pack.c
Expand Up @@ -2178,7 +2178,7 @@ Init_pack(void)
}

void
InitVM_pack(rb_vm_t *vm)
InitVM_pack(ruby_vm_t *vm)
{
rb_define_method(rb_cArray, "pack", pack_pack, 1);
rb_define_method(rb_cString, "unpack", pack_unpack, 1);
Expand Down
4 changes: 2 additions & 2 deletions proc.c
Expand Up @@ -1792,7 +1792,7 @@ Init_Proc(void)
}

void
InitVM_Proc(rb_vm_t *vm)
InitVM_Proc(ruby_vm_t *vm)
{
/* Proc */
rb_cProc = rb_define_class("Proc", rb_cObject);
Expand Down Expand Up @@ -1918,7 +1918,7 @@ Init_Binding(void)
}

void
InitVM_Binding(rb_vm_t *vm)
InitVM_Binding(ruby_vm_t *vm)
{
rb_cBinding = rb_define_class("Binding", rb_cObject);
rb_undef_alloc_func(rb_cBinding);
Expand Down
2 changes: 1 addition & 1 deletion process.c
Expand Up @@ -5023,7 +5023,7 @@ Init_process(void)
}

void
InitVM_process(rb_vm_t *vm)
InitVM_process(ruby_vm_t *vm)
{
VALUE rb_mProcUID;
VALUE rb_mProcGID;
Expand Down
6 changes: 3 additions & 3 deletions random.c
Expand Up @@ -545,12 +545,12 @@ Init_RandomSeed(void)
}

void
InitVM_RandomSeed(rb_vm_t *vm)
InitVM_RandomSeed(ruby_vm_t *vm)
{
}

static void
InitVM_RandomSeed2(rb_vm_t *vm)
InitVM_RandomSeed2(ruby_vm_t *vm)
{
struct Random *r;
VALUE rv = Data_Make_Struct(rb_cData, struct Random, random_mark, -1, r);
Expand All @@ -576,7 +576,7 @@ Init_Random(void)
}

void
InitVM_Random(rb_vm_t *vm)
InitVM_Random(ruby_vm_t *vm)
{
InitVM_RandomSeed2(vm);
rb_define_global_function("srand", rb_f_srand, -1);
Expand Down
2 changes: 1 addition & 1 deletion range.c
Expand Up @@ -918,7 +918,7 @@ Init_Range(void)
}

void
InitVM_Range(rb_vm_t *vm)
InitVM_Range(ruby_vm_t *vm)
{
rb_cRange = rb_struct_define_without_accessor(
"Range", rb_cObject, range_alloc,
Expand Down
2 changes: 1 addition & 1 deletion rational.c
Expand Up @@ -1501,7 +1501,7 @@ Init_Rational(void)
}

void
InitVM_Rational(rb_vm_t *vm)
InitVM_Rational(ruby_vm_t *vm)
{
assert(fprintf(stderr, "assert() is now active\n"));

Expand Down
2 changes: 1 addition & 1 deletion re.c
Expand Up @@ -3358,7 +3358,7 @@ Init_Regexp(void)
}

void
InitVM_Regexp(rb_vm_t *vm)
InitVM_Regexp(ruby_vm_t *vm)
{
rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError);

Expand Down
2 changes: 1 addition & 1 deletion signal.c
Expand Up @@ -1149,7 +1149,7 @@ Init_signal(void)
}

void
InitVM_signal(rb_vm_t *vm)
InitVM_signal(ruby_vm_t *vm)
{
#ifndef MACOS_UNUSE_SIGNAL
VALUE mSignal = rb_define_module("Signal");
Expand Down
2 changes: 1 addition & 1 deletion string.c
Expand Up @@ -7068,7 +7068,7 @@ Init_String(void)
}

void
InitVM_String(rb_vm_t *vm)
InitVM_String(ruby_vm_t *vm)
{
rb_cString = rb_define_class("String", rb_cObject);
rb_include_module(rb_cString, rb_mComparable);
Expand Down
2 changes: 1 addition & 1 deletion struct.c
Expand Up @@ -879,7 +879,7 @@ Init_Struct(void)
}

void
InitVM_Struct(rb_vm_t *vm)
InitVM_Struct(ruby_vm_t *vm)
{
rb_cStruct = rb_define_class("Struct", rb_cObject);
rb_include_module(rb_cStruct, rb_mEnumerable);
Expand Down
2 changes: 1 addition & 1 deletion thread.c
Expand Up @@ -3697,7 +3697,7 @@ Init_Thread(void)
}

void
InitVM_Thread(rb_vm_t *vm)
InitVM_Thread(ruby_vm_t *vm)
{
VALUE cThGroup;

Expand Down
2 changes: 1 addition & 1 deletion time.c
Expand Up @@ -2387,7 +2387,7 @@ Init_Time(void)
}

void
InitVM_Time(rb_vm_t *vm)
InitVM_Time(ruby_vm_t *vm)
{
rb_cTime = rb_define_class("Time", rb_cObject);
rb_include_module(rb_cTime, rb_mComparable);
Expand Down
2 changes: 1 addition & 1 deletion transcode.c
Expand Up @@ -4017,7 +4017,7 @@ Init_transcode(void)
}

void
InitVM_transcode(rb_vm_t *vm)
InitVM_transcode(ruby_vm_t *vm)
{
rb_eUndefinedConversionError = rb_define_class_under(rb_cEncoding, "UndefinedConversionError", rb_eEncodingError);
rb_eInvalidByteSequenceError = rb_define_class_under(rb_cEncoding, "InvalidByteSequenceError", rb_eEncodingError);
Expand Down

0 comments on commit 7bcdd1f

Please sign in to comment.