diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-14 23:12:00 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-14 23:12:00 +0900 |
| commit | 228687cfff7aed676c9fc02fa587bd74ed097489 (patch) | |
| tree | 223d193f47dec4a985325a4cf26021ae46702a99 /include/mrbconf.h | |
| parent | ce1756b3b6a23050d96d49aef64a7f964e8bc75f (diff) | |
| download | mruby-228687cfff7aed676c9fc02fa587bd74ed097489.tar.gz mruby-228687cfff7aed676c9fc02fa587bd74ed097489.zip | |
experimental MRB_INT16 added
Diffstat (limited to 'include/mrbconf.h')
| -rw-r--r-- | include/mrbconf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h index 275cdf4c1..b485642dc 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -68,7 +68,7 @@ # define str_to_mrb_float(buf) strtod(buf, NULL) #endif -#ifdef MRB_INT64 +#if defined(MRB_INT64) # ifdef MRB_NAN_BOXING # error Cannot use NaN boxing when mrb_int is 64bit # else @@ -77,6 +77,11 @@ # define MRB_INT_MAX INT64_MAX # define str_to_mrb_int(buf) strtoll(buf, NULL, 10) # endif +#elif defined(MRB_INT16) + typedef int16_t mrb_int; +# define MRB_INT_MIN INT16_MIN +# define MRB_INT_MAX INT16_MAX +# define str_to_mrb_int(buf) strtol(buf, NULL, 10) #else typedef int32_t mrb_int; # define MRB_INT_MIN INT32_MIN |
