Refactoring integer ranges.

- Remove `mrb_ssize`
- Fix `MRB_FIXNUM_{MIN,MAX}` to 32 bits on `MRB_NAN_BOXING`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-11-17 12:38:10 +09:00
parent aae8237335
commit 9fbf0ef886
8 changed files with 39 additions and 44 deletions
+3 -3
View File
@@ -23,9 +23,9 @@ struct RString {
MRB_OBJECT_HEADER;
union {
struct {
mrb_ssize len;
mrb_int len;
union {
mrb_ssize capa;
mrb_int capa;
struct mrb_shared_string *shared;
struct RString *fshared;
} aux;
@@ -54,7 +54,7 @@ struct RStringEmbed {
RSTR_SET_EMBED_LEN((s),(n));\
}\
else {\
(s)->as.heap.len = (mrb_ssize)(n);\
(s)->as.heap.len = (mrb_int)(n);\
}\
} while (0)
#define RSTR_EMBED_PTR(s) (((struct RStringEmbed*)(s))->ary)