diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-24 19:03:32 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-25 13:07:10 +0900 |
| commit | 5c804cf68f2b7e80780d3d812efb70ef9e376c08 (patch) | |
| tree | a2a135237c605849eda427e267e71770a09df330 /src | |
| parent | 1f90a397994376451e1efd2055c25a240832d5a1 (diff) | |
| download | mruby-5c804cf68f2b7e80780d3d812efb70ef9e376c08.tar.gz mruby-5c804cf68f2b7e80780d3d812efb70ef9e376c08.zip | |
Remove redundant include headers.
- stdlib.h
- stddef.h
- stdint.h
- stdarg.h
- limits.h
- float.h
Diffstat (limited to 'src')
| -rw-r--r-- | src/class.c | 1 | ||||
| -rw-r--r-- | src/dump.c | 1 | ||||
| -rw-r--r-- | src/error.c | 1 | ||||
| -rw-r--r-- | src/fmt_fp.c | 1 | ||||
| -rw-r--r-- | src/gc.c | 5 | ||||
| -rw-r--r-- | src/load.c | 2 | ||||
| -rw-r--r-- | src/numeric.c | 3 | ||||
| -rw-r--r-- | src/readflt.c | 1 | ||||
| -rw-r--r-- | src/string.c | 12 | ||||
| -rw-r--r-- | src/symbol.c | 1 | ||||
| -rw-r--r-- | src/vm.c | 8 |
11 files changed, 11 insertions, 25 deletions
diff --git a/src/class.c b/src/class.c index 33a610c26..cf438d55e 100644 --- a/src/class.c +++ b/src/class.c @@ -4,7 +4,6 @@ ** See Copyright Notice in mruby.h */ -#include <stdarg.h> #include <mruby.h> #include <mruby/array.h> #include <mruby/hash.h> diff --git a/src/dump.c b/src/dump.c index 628c3dbc4..94d5cf74d 100644 --- a/src/dump.c +++ b/src/dump.c @@ -5,7 +5,6 @@ */ #include <string.h> -#include <limits.h> #include <math.h> #include <mruby/dump.h> #include <mruby/string.h> diff --git a/src/error.c b/src/error.c index 7953deea7..45e118b96 100644 --- a/src/error.c +++ b/src/error.c @@ -5,7 +5,6 @@ */ #include <errno.h> -#include <stdarg.h> #include <stdlib.h> #include <mruby.h> #include <mruby/array.h> diff --git a/src/fmt_fp.c b/src/fmt_fp.c index 43daf2307..bac62b88a 100644 --- a/src/fmt_fp.c +++ b/src/fmt_fp.c @@ -1,6 +1,5 @@ #include <mruby.h> #include <string.h> -#include <stdlib.h> #ifndef MRB_NO_FLOAT /*********************************************************************** @@ -5,7 +5,6 @@ */ #include <string.h> -#include <stdlib.h> #ifdef MRB_USE_MALLOC_TRIM #include <malloc.h> #endif @@ -24,6 +23,10 @@ #include <mruby/throw.h> #include <mruby/presym.h> +#ifdef MRB_GC_STRESS +#include <stdlib.h> +#endif + /* = Tri-color Incremental Garbage Collection diff --git a/src/load.c b/src/load.c index bd0811743..83e06f1f8 100644 --- a/src/load.c +++ b/src/load.c @@ -4,8 +4,6 @@ ** See Copyright Notice in mruby.h */ -#include <limits.h> -#include <stdlib.h> #include <string.h> #include <math.h> #include <mruby/dump.h> diff --git a/src/numeric.c b/src/numeric.c index b22026ebb..17f5ac1bc 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -5,11 +5,8 @@ */ #ifndef MRB_NO_FLOAT -#include <float.h> #include <math.h> #endif -#include <limits.h> -#include <stdlib.h> #include <string.h> #include <mruby.h> diff --git a/src/readflt.c b/src/readflt.c index 19a8e8dc6..b320a43c1 100644 --- a/src/readflt.c +++ b/src/readflt.c @@ -20,7 +20,6 @@ My modifications in this file are also placed in the public domain. Matz (Yukihiro Matsumoto) */ -#include <stdlib.h> #include <string.h> #include <math.h> #include <errno.h> diff --git a/src/string.c b/src/string.c index 03d9c8a9c..2258cc218 100644 --- a/src/string.c +++ b/src/string.c @@ -8,14 +8,6 @@ # define _CRT_NONSTDC_NO_DEPRECATE #endif -#ifndef MRB_NO_FLOAT -#include <float.h> -#include <math.h> -#endif -#include <limits.h> -#include <stddef.h> -#include <stdlib.h> -#include <string.h> #include <mruby.h> #include <mruby/array.h> #include <mruby/class.h> @@ -23,6 +15,10 @@ #include <mruby/string.h> #include <mruby/numeric.h> #include <mruby/presym.h> +#ifndef MRB_NO_FLOAT +#include <math.h> +#endif +#include <string.h> typedef struct mrb_shared_string { int refcnt; diff --git a/src/symbol.c b/src/symbol.c index 007b8c885..5b05f1a9f 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -4,7 +4,6 @@ ** See Copyright Notice in mruby.h */ -#include <limits.h> #include <string.h> #include <mruby.h> #include <mruby/khash.h> @@ -4,11 +4,6 @@ ** See Copyright Notice in mruby.h */ -#include <stddef.h> -#include <stdarg.h> -#ifndef MRB_NO_FLOAT -#include <math.h> -#endif #include <mruby.h> #include <mruby/array.h> #include <mruby/class.h> @@ -25,6 +20,9 @@ #include <mruby/throw.h> #include <mruby/dump.h> #include <mruby/presym.h> +#ifndef MRB_NO_FLOAT +#include <math.h> +#endif #ifdef MRB_NO_STDIO #if defined(__cplusplus) |
