Integrate Fixnum class into Integer class

* The `Fixnum` constant is now an alias for the `Integer` class.
* Remove `struct mrb_state::fixnum_class` member.
  If necessary, use `struct mrb_state::integer_class` instead.
This commit is contained in:
dearblue
2020-01-19 09:48:14 +09:00
committed by Yukihiro "Matz" Matsumoto
parent 40d0d8fe0e
commit 80fe9838d2
31 changed files with 99 additions and 99 deletions
+3 -3
View File
@@ -248,7 +248,7 @@ typedef struct mrb_state {
#ifndef MRB_NO_FLOAT
struct RClass *float_class;
#endif
struct RClass *fixnum_class;
struct RClass *integer_class;
struct RClass *true_class;
struct RClass *false_class;
struct RClass *nil_class;
@@ -890,8 +890,8 @@ MRB_API struct RClass* mrb_define_module_under_id(mrb_state *mrb, struct RClass
* | `s` | {String} | const char *, {mrb_int} | Receive two arguments; `s!` gives (`NULL`,`0`) for `nil` |
* | `z` | {String} | const char * | `NULL` terminated string; `z!` gives `NULL` for `nil` |
* | `a` | {Array} | {mrb_value} *, {mrb_int} | Receive two arguments; `a!` gives (`NULL`,`0`) for `nil` |
* | `f` | {Fixnum}/{Float} | {mrb_float} | |
* | `i` | {Fixnum}/{Float} | {mrb_int} | |
* | `f` | {Integer}/{Float} | {mrb_float} | |
* | `i` | {Integer}/{Float} | {mrb_int} | |
* | `b` | boolean | {mrb_bool} | |
* | `n` | {String}/{Symbol} | {mrb_sym} | |
* | `d` | data | void *, {mrb_data_type} const | 2nd argument will be used to check data type so it won't be modified; when `!` follows, the value may be `nil` |
+1 -1
View File
@@ -36,7 +36,7 @@ mrb_class(mrb_state *mrb, mrb_value v)
case MRB_TT_SYMBOL:
return mrb->symbol_class;
case MRB_TT_FIXNUM:
return mrb->fixnum_class;
return mrb->integer_class;
#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT:
return mrb->float_class;
+2 -2
View File
@@ -1,5 +1,5 @@
/**
** @file mruby/numeric.h - Numeric, Integer, Float, Fixnum class
** @file mruby/numeric.h - Numeric, Integer, Float class
**
** See Copyright Notice in mruby.h
*/
@@ -12,7 +12,7 @@
/**
* Numeric class and it's sub-classes.
*
* Integer, Float and Fixnum
* Integer and Float
*/
MRB_BEGIN_DECL