From 80fe9838d2fdab1bb819bbeea892ebe748837b99 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 19 Jan 2020 09:48:14 +0900 Subject: 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. --- include/mruby.h | 6 +++--- include/mruby/class.h | 2 +- include/mruby/numeric.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/mruby.h b/include/mruby.h index 485a94d70..f07adbb13 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -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` | diff --git a/include/mruby/class.h b/include/mruby/class.h index a02c4ef17..b4b5454d5 100644 --- a/include/mruby/class.h +++ b/include/mruby/class.h @@ -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; diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h index 10b242688..b8cc5b50f 100644 --- a/include/mruby/numeric.h +++ b/include/mruby/numeric.h @@ -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 -- cgit v1.2.3