summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/codegen.c
diff options
context:
space:
mode:
authordearblue <[email protected]>2021-08-21 15:42:57 +0900
committerdearblue <[email protected]>2021-08-21 15:42:57 +0900
commit5a576028607c4bd7b46e8b1d2726329355d4bc03 (patch)
tree9c459b43e52d4421e66ff05a3955dc3f234854a6 /mrbgems/mruby-compiler/core/codegen.c
parent886055b3fb047839abe13b03dd44d9e35c35d5b0 (diff)
downloadmruby-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 'mrbgems/mruby-compiler/core/codegen.c')
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 3f849b0f1..4546e6cc0 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -4,9 +4,6 @@
** See Copyright Notice in mruby.h
*/
-#include <ctype.h>
-#include <string.h>
-#include <math.h>
#include <mruby.h>
#include <mruby/compile.h>
#include <mruby/proc.h>
@@ -19,6 +16,8 @@
#include <mruby/opcode.h>
#include <mruby/re.h>
#include <mruby/throw.h>
+#include <ctype.h>
+#include <string.h>
#ifndef MRB_CODEGEN_LEVEL_MAX
#define MRB_CODEGEN_LEVEL_MAX 1024