diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-14 14:34:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:40 +0900 |
| commit | 8a87549315d0c7fd984a8ad239ebe3dbab4d2855 (patch) | |
| tree | b5a0209755619ecc2e7bca1314b7a8e61c7b0d21 /include/mrbconf.h | |
| parent | ef9df5dc7d32b79e6b4e0d6924eeae2cc614dfce (diff) | |
| download | mruby-8a87549315d0c7fd984a8ad239ebe3dbab4d2855.tar.gz mruby-8a87549315d0c7fd984a8ad239ebe3dbab4d2855.zip | |
Rename float configuration option names.
- `MRB_WITHOUT_FLOAT` => `MRB_NO_FLOAT`
- `MRB_USE_FLOAT` => `MRB_USE_FLOAT32`
The former is to use `USE_XXX` naming convention. The latter is to make
sure `float` is 32bit float and not floating point number in general.
Diffstat (limited to 'include/mrbconf.h')
| -rw-r--r-- | include/mrbconf.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h index 734ec98e7..159aee48f 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -25,14 +25,24 @@ #endif /* configuration options: */ -/* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */ -//#define MRB_USE_FLOAT +/* add -DMRB_USE_FLOAT32 to use float instead of double for floating point numbers */ +//#define MRB_USE_FLOAT32 /* exclude floating point numbers */ -//#define MRB_WITHOUT_FLOAT +//#define MRB_NO_FLOAT -#if defined(MRB_USE_FLOAT) && defined(MRB_WITHOUT_FLOAT) -#error Cannot define MRB_USE_FLOAT and MRB_WITHOUT_FLOAT at the same time +/* obsolete configuration */ +#if defined(MRB_USE_FLOAT) +# define MRB_USE_FLOAT32 +#endif + +/* obsolete configuration */ +#if defined(MRB_WITHOUT_FLOAT) +# define MRB_NO_FLOAT +#endif + +#if defined(MRB_USE_FLOAT32) && defined(MRB_NO_FLOAT) +#error Cannot define MRB_USE_FLOAT32 and MRB_NO_FLOAT at the same time #endif /* stop inlining floating point numbers in mrb_value (effective only with MRB_WORD_BOXING)*/ @@ -65,7 +75,7 @@ # endif #endif -/* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT and MRB_WITHOUT_FLOAT */ +/* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT32 and MRB_NO_FLOAT */ //#define MRB_NAN_BOXING /* represent mrb_value as a word (natural unit of data for the processor) */ |
