introduce toplevel object main; close #327

This commit is contained in:
Yukihiro Matsumoto
2012-09-03 00:41:09 +09:00
parent 9c12b47d73
commit fd3af6aec8
5 changed files with 14 additions and 5 deletions
+2
View File
@@ -39,6 +39,8 @@ mrb_class(mrb_state *mrb, mrb_value v)
return mrb->fixnum_class;
case MRB_TT_FLOAT:
return mrb->float_class;
case MRB_TT_MAIN:
return mrb->object_class;
#ifdef ENABLE_REGEXP
case MRB_TT_REGEX:
+4 -2
View File
@@ -34,7 +34,8 @@ enum mrb_vtype {
MRB_TT_FILE, /* 21 */
MRB_TT_ENV, /* 22 */
MRB_TT_DATA, /* 23 */
MRB_TT_MAXDEFINE /* 24 */
MRB_TT_MAIN, /* 24 */
MRB_TT_MAXDEFINE /* 25 */
};
typedef struct mrb_value {
@@ -94,7 +95,8 @@ enum mrb_vtype {
MRB_TT_FILE, /* 22 */
MRB_TT_ENV, /* 23 */
MRB_TT_DATA, /* 24 */
MRB_TT_MAXDEFINE /* 25 */
MRB_TT_MAIN, /* 25 */
MRB_TT_MAXDEFINE /* 26 */
};
#ifdef MRB_ENDIAN_BIG