diff options
| author | dearblue <[email protected]> | 2021-08-21 15:42:57 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-08-21 15:42:57 +0900 |
| commit | 5a576028607c4bd7b46e8b1d2726329355d4bc03 (patch) | |
| tree | 9c459b43e52d4421e66ff05a3955dc3f234854a6 /src/load.c | |
| parent | 886055b3fb047839abe13b03dd44d9e35c35d5b0 (diff) | |
| download | mruby-5a576028607c4bd7b46e8b1d2726329355d4bc03.tar.gz mruby-5a576028607c4bd7b46e8b1d2726329355d4bc03.zip | |
Organize the include of header files
- `#include <math.h>` is done in `mruby.h`.
Eliminate the need to worry about the `MRB_NO_FLOAT` macro.
- Include mruby header files before standard header files.
If the standard header file is already placed before `mruby.h`, the standard header file added in the future tends to be placed before `mruby.h`.
This change should some reduce the chances of macros that must be defined becoming undefined in C++ or including problematic header files in a particular mruby build configuration.
Diffstat (limited to 'src/load.c')
| -rw-r--r-- | src/load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/load.c b/src/load.c index 83e06f1f8..b5b069fcf 100644 --- a/src/load.c +++ b/src/load.c @@ -4,8 +4,7 @@ ** See Copyright Notice in mruby.h */ -#include <string.h> -#include <math.h> +#include <mruby.h> #include <mruby/dump.h> #include <mruby/irep.h> #include <mruby/proc.h> @@ -14,6 +13,7 @@ #include <mruby/error.h> #include <mruby/data.h> #include <mruby/endian.h> +#include <string.h> #if SIZE_MAX < UINT32_MAX # error size_t must be at least 32 bits wide |
