From 8956c5abb5165a85d3534af494774eeb8b1ca798 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 5 Mar 2026 11:19:52 +0900 Subject: [PATCH] mruby.h: include mruby/presym.h for all source files Since presym is now mandatory, mruby.h includes presym.h so that MRB_SYM() macros are available everywhere without explicit include. Remove redundant #include from all source files. Co-authored-by: Claude --- doc/guides/rom-method-table.md | 1 - examples/mrbgems/mruby-YOUR-bigint/core/bigint.c | 5 ----- include/mruby.h | 4 +++- mrbgems/hal-posix-socket/src/socket_hal.c | 1 - mrbgems/hal-win-socket/src/socket_hal.c | 1 - mrbgems/mruby-array-ext/src/array.c | 1 - mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c | 1 - mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 1 - mrbgems/mruby-bin-mruby/tools/mruby/mruby.c | 1 - mrbgems/mruby-binding/src/binding.c | 1 - mrbgems/mruby-binding/test/binding.c | 1 - mrbgems/mruby-catch/src/catch.c | 1 - mrbgems/mruby-class-ext/src/class.c | 1 - mrbgems/mruby-cmath/src/cmath.c | 1 - mrbgems/mruby-compiler/core/codegen.c | 1 - mrbgems/mruby-compiler/core/parse.y | 1 - mrbgems/mruby-compiler/core/y.tab.c | 1 - mrbgems/mruby-complex/src/complex.c | 1 - mrbgems/mruby-data/src/data.c | 1 - mrbgems/mruby-dir/src/dir.c | 1 - mrbgems/mruby-encoding/src/encoding.c | 1 - mrbgems/mruby-errno/src/errno.c | 1 - mrbgems/mruby-eval/src/eval.c | 1 - mrbgems/mruby-exit/src/mruby_exit.c | 1 - mrbgems/mruby-fiber/src/fiber.c | 1 - mrbgems/mruby-hash-ext/src/hash_ext.c | 1 - mrbgems/mruby-io/src/file.c | 1 - mrbgems/mruby-io/src/file_test.c | 1 - mrbgems/mruby-io/src/io.c | 1 - mrbgems/mruby-kernel-ext/src/kernel.c | 1 - mrbgems/mruby-math/src/math.c | 1 - mrbgems/mruby-metaprog/src/metaprog.c | 1 - mrbgems/mruby-method/src/method.c | 1 - mrbgems/mruby-numeric-ext/src/numeric_ext.c | 1 - mrbgems/mruby-object-ext/src/object.c | 1 - mrbgems/mruby-objectspace/src/mruby_objectspace.c | 1 - mrbgems/mruby-pack/src/pack.c | 1 - mrbgems/mruby-proc-binding/src/proc_binding.c | 1 - mrbgems/mruby-proc-ext/src/proc.c | 1 - mrbgems/mruby-random/src/random.c | 1 - mrbgems/mruby-range-ext/src/range.c | 1 - mrbgems/mruby-rational/src/rational.c | 1 - mrbgems/mruby-set/src/set.c | 1 - mrbgems/mruby-sleep/src/sleep.c | 1 - mrbgems/mruby-socket/src/socket.c | 1 - mrbgems/mruby-sprintf/src/sprintf.c | 1 - mrbgems/mruby-strftime/src/strftime.c | 1 - mrbgems/mruby-string-ext/src/string.c | 1 - mrbgems/mruby-struct/src/struct.c | 1 - mrbgems/mruby-symbol-ext/src/symbol.c | 1 - mrbgems/mruby-task/src/task.c | 1 - mrbgems/mruby-time/src/time.c | 1 - src/array.c | 1 - src/backtrace.c | 1 - src/cdump.c | 1 - src/class.c | 1 - src/enum.c | 1 - src/error.c | 1 - src/gc.c | 1 - src/hash.c | 1 - src/kernel.c | 1 - src/numeric.c | 1 - src/numops.c | 1 - src/object.c | 1 - src/print.c | 1 - src/proc.c | 1 - src/range.c | 1 - src/string.c | 1 - src/symbol.c | 1 - src/variable.c | 1 - src/vm.c | 1 - 71 files changed, 3 insertions(+), 75 deletions(-) diff --git a/doc/guides/rom-method-table.md b/doc/guides/rom-method-table.md index f15b9a29b..0e7f7f0c0 100644 --- a/doc/guides/rom-method-table.md +++ b/doc/guides/rom-method-table.md @@ -79,7 +79,6 @@ Include `` (which provides `mrb_mt_entry`, ```c #include -#include static const mrb_mt_entry my_rom_entries[] = { MRB_MT_ENTRY(my_method_a, MRB_SYM(method_a), MRB_ARGS_REQ(1)), diff --git a/examples/mrbgems/mruby-YOUR-bigint/core/bigint.c b/examples/mrbgems/mruby-YOUR-bigint/core/bigint.c index 3cfc717b0..1174968ef 100644 --- a/examples/mrbgems/mruby-YOUR-bigint/core/bigint.c +++ b/examples/mrbgems/mruby-YOUR-bigint/core/bigint.c @@ -15,11 +15,6 @@ */ #include -/* - * The "mruby/presym.h" file is placed at the end of the mruby header file. - */ -#include - /* * Define your own struct RBigint. * diff --git a/include/mruby.h b/include/mruby.h index 1c12df08e..1c6e8385a 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -1015,7 +1015,7 @@ typedef const char *mrb_args_format; * mrb_value str, kw_rest; * uint32_t kw_num = 3; * uint32_t kw_required = 1; - * // Note that `#include ` is required beforehand because `MRB_SYM()` is used. + * // `MRB_SYM()` is available via `mruby.h` (which includes `mruby/presym.h`). * // If the usage of `MRB_SYM()` is not desired, replace it with `mrb_intern_lit()`. * mrb_sym kw_names[] = { MRB_SYM(x), MRB_SYM(y), MRB_SYM(z) }; * mrb_value kw_values[kw_num]; @@ -1594,6 +1594,8 @@ MRB_API mrb_value mrb_format(mrb_state *mrb, const char *format, ...); #ifdef MRB_PRESYM_SCANNING # include +#else +# include #endif #if 0 diff --git a/mrbgems/hal-posix-socket/src/socket_hal.c b/mrbgems/hal-posix-socket/src/socket_hal.c index d333ee40a..1cc08c5af 100644 --- a/mrbgems/hal-posix-socket/src/socket_hal.c +++ b/mrbgems/hal-posix-socket/src/socket_hal.c @@ -11,7 +11,6 @@ #include #include #include -#include #include "socket_hal.h" #include diff --git a/mrbgems/hal-win-socket/src/socket_hal.c b/mrbgems/hal-win-socket/src/socket_hal.c index 3acda0b5e..f052a0998 100644 --- a/mrbgems/hal-win-socket/src/socket_hal.c +++ b/mrbgems/hal-win-socket/src/socket_hal.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "socket_hal.h" #include #include diff --git a/mrbgems/mruby-array-ext/src/array.c b/mrbgems/mruby-array-ext/src/array.c index aa9467714..f31e58758 100644 --- a/mrbgems/mruby-array-ext/src/array.c +++ b/mrbgems/mruby-array-ext/src/array.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c index a383f3aab..6376daaef 100644 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "apiprint.h" static void diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 8c5fdb87b..511e0ce7d 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c b/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c index 1a7197eca..d5c159f3e 100644 --- a/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +++ b/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c @@ -12,7 +12,6 @@ #include #include #include -#include #if defined(_WIN32) # include /* for setmode */ diff --git a/mrbgems/mruby-binding/src/binding.c b/mrbgems/mruby-binding/src/binding.c index d5e3a0424..a5c9d6c01 100644 --- a/mrbgems/mruby-binding/src/binding.c +++ b/mrbgems/mruby-binding/src/binding.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/mrbgems/mruby-binding/test/binding.c b/mrbgems/mruby-binding/test/binding.c index efc982a75..e7dc5b08c 100644 --- a/mrbgems/mruby-binding/test/binding.c +++ b/mrbgems/mruby-binding/test/binding.c @@ -1,5 +1,4 @@ #include -#include static mrb_value binding_in_c(mrb_state *mrb, mrb_value self) diff --git a/mrbgems/mruby-catch/src/catch.c b/mrbgems/mruby-catch/src/catch.c index 29cacfc4d..4acbd822c 100644 --- a/mrbgems/mruby-catch/src/catch.c +++ b/mrbgems/mruby-catch/src/catch.c @@ -4,7 +4,6 @@ #include #include #include -#include /* Pre-defined symbols used by catch implementation */ MRB_PRESYM_DEFINE_VAR_AND_INITER(catch_syms, 3, MRB_SYM(Object), MRB_SYM(new), MRB_SYM(call)) diff --git a/mrbgems/mruby-class-ext/src/class.c b/mrbgems/mruby-class-ext/src/class.c index c95253872..13c9653a9 100644 --- a/mrbgems/mruby-class-ext/src/class.c +++ b/mrbgems/mruby-class-ext/src/class.c @@ -5,7 +5,6 @@ #include #include #include -#include /* * Get the name of a module/class. diff --git a/mrbgems/mruby-cmath/src/cmath.c b/mrbgems/mruby-cmath/src/cmath.c index b0c6675db..e89ec285a 100644 --- a/mrbgems/mruby-cmath/src/cmath.c +++ b/mrbgems/mruby-cmath/src/cmath.c @@ -10,7 +10,6 @@ */ #include -#include #ifdef MRB_NO_FLOAT # error CMath conflicts with 'MRB_NO_FLOAT' configuration diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 60f39ae8a..8b0dfda42 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -46,7 +46,6 @@ #include #include #include -#include #include "node.h" #include #include diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 74f482ade..fcec6c880 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -23,7 +23,6 @@ #include #include #include -#include #include "node.h" #define YYLEX_PARAM p diff --git a/mrbgems/mruby-compiler/core/y.tab.c b/mrbgems/mruby-compiler/core/y.tab.c index 741c1d2e7..9da966203 100644 --- a/mrbgems/mruby-compiler/core/y.tab.c +++ b/mrbgems/mruby-compiler/core/y.tab.c @@ -85,7 +85,6 @@ #include #include #include -#include #include "node.h" #define YYLEX_PARAM p diff --git a/mrbgems/mruby-complex/src/complex.c b/mrbgems/mruby-complex/src/complex.c index 3caf3a72b..4eba1fe16 100644 --- a/mrbgems/mruby-complex/src/complex.c +++ b/mrbgems/mruby-complex/src/complex.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #ifdef MRB_NO_FLOAT diff --git a/mrbgems/mruby-data/src/data.c b/mrbgems/mruby-data/src/data.c index 704c7d0c9..49fa2d6d1 100644 --- a/mrbgems/mruby-data/src/data.c +++ b/mrbgems/mruby-data/src/data.c @@ -13,7 +13,6 @@ #include #include #include -#include #define RDATA_LEN(st) RARRAY_LEN(st) #define RDATA_PTR(st) RARRAY_PTR(st) diff --git a/mrbgems/mruby-dir/src/dir.c b/mrbgems/mruby-dir/src/dir.c index 215f74381..eb12eb593 100644 --- a/mrbgems/mruby-dir/src/dir.c +++ b/mrbgems/mruby-dir/src/dir.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "dir_hal.h" #include diff --git a/mrbgems/mruby-encoding/src/encoding.c b/mrbgems/mruby-encoding/src/encoding.c index 4654e9fca..ac9d52fca 100644 --- a/mrbgems/mruby-encoding/src/encoding.c +++ b/mrbgems/mruby-encoding/src/encoding.c @@ -2,7 +2,6 @@ #include #include #include -#include #define ENC_ASCII_8BIT "ASCII-8BIT" #define ENC_BINARY "BINARY" diff --git a/mrbgems/mruby-errno/src/errno.c b/mrbgems/mruby-errno/src/errno.c index 37d82b954..881be2b13 100644 --- a/mrbgems/mruby-errno/src/errno.c +++ b/mrbgems/mruby-errno/src/errno.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-eval/src/eval.c b/mrbgems/mruby-eval/src/eval.c index 8845a534e..def92a691 100644 --- a/mrbgems/mruby-eval/src/eval.c +++ b/mrbgems/mruby-eval/src/eval.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-exit/src/mruby_exit.c b/mrbgems/mruby-exit/src/mruby_exit.c index 7ba153a54..13da43201 100644 --- a/mrbgems/mruby-exit/src/mruby_exit.c +++ b/mrbgems/mruby-exit/src/mruby_exit.c @@ -2,7 +2,6 @@ #include #include #include -#include #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 diff --git a/mrbgems/mruby-fiber/src/fiber.c b/mrbgems/mruby-fiber/src/fiber.c index 4fcb5cb56..c7655c4a7 100644 --- a/mrbgems/mruby-fiber/src/fiber.c +++ b/mrbgems/mruby-fiber/src/fiber.c @@ -6,7 +6,6 @@ #include #include #include -#include #define fiber_ptr(o) ((struct RFiber*)mrb_ptr(o)) diff --git a/mrbgems/mruby-hash-ext/src/hash_ext.c b/mrbgems/mruby-hash-ext/src/hash_ext.c index 2aac680d1..567f96366 100644 --- a/mrbgems/mruby-hash-ext/src/hash_ext.c +++ b/mrbgems/mruby-hash-ext/src/hash_ext.c @@ -9,7 +9,6 @@ #include #include #include -#include /* * call-seq: diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index f146233f3..096578b21 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "io_hal.h" #include diff --git a/mrbgems/mruby-io/src/file_test.c b/mrbgems/mruby-io/src/file_test.c index 6f1ad24f0..00d8b00a4 100644 --- a/mrbgems/mruby-io/src/file_test.c +++ b/mrbgems/mruby-io/src/file_test.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "io_hal.h" diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c index 6b161c936..58b3094a2 100644 --- a/mrbgems/mruby-io/src/io.c +++ b/mrbgems/mruby-io/src/io.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "io_hal.h" #include diff --git a/mrbgems/mruby-kernel-ext/src/kernel.c b/mrbgems/mruby-kernel-ext/src/kernel.c index d9ea0e315..1ba93a33c 100644 --- a/mrbgems/mruby-kernel-ext/src/kernel.c +++ b/mrbgems/mruby-kernel-ext/src/kernel.c @@ -8,7 +8,6 @@ #include #include #include -#include /* * call-seq: diff --git a/mrbgems/mruby-math/src/math.c b/mrbgems/mruby-math/src/math.c index bf5ee9b5b..e746b7ce4 100644 --- a/mrbgems/mruby-math/src/math.c +++ b/mrbgems/mruby-math/src/math.c @@ -11,7 +11,6 @@ #endif #include -#include static void domain_error(mrb_state *mrb, const char *func) diff --git a/mrbgems/mruby-metaprog/src/metaprog.c b/mrbgems/mruby-metaprog/src/metaprog.c index 79b2ae46d..ecddd96cb 100644 --- a/mrbgems/mruby-metaprog/src/metaprog.c +++ b/mrbgems/mruby-metaprog/src/metaprog.c @@ -7,7 +7,6 @@ #include #include #include -#include #define MT_PROTECTED MRB_METHOD_PROTECTED_FL #define MT_NOPRIV (MRB_METHOD_PRIVATE_FL|MT_PROTECTED) diff --git a/mrbgems/mruby-method/src/method.c b/mrbgems/mruby-method/src/method.c index 69dcdedfc..ad0b63fcf 100644 --- a/mrbgems/mruby-method/src/method.c +++ b/mrbgems/mruby-method/src/method.c @@ -5,7 +5,6 @@ #include #include #include -#include // Defined by mruby-proc-ext on which mruby-method depends mrb_value mrb_proc_parameters(mrb_state *mrb, mrb_value proc); diff --git a/mrbgems/mruby-numeric-ext/src/numeric_ext.c b/mrbgems/mruby-numeric-ext/src/numeric_ext.c index 0a0ad174f..ac29bce99 100644 --- a/mrbgems/mruby-numeric-ext/src/numeric_ext.c +++ b/mrbgems/mruby-numeric-ext/src/numeric_ext.c @@ -4,7 +4,6 @@ #include #include #include -#include #ifndef MRB_NO_FLOAT static mrb_value flo_remainder(mrb_state *mrb, mrb_value self); diff --git a/mrbgems/mruby-object-ext/src/object.c b/mrbgems/mruby-object-ext/src/object.c index ba74c9174..7ffd8215f 100644 --- a/mrbgems/mruby-object-ext/src/object.c +++ b/mrbgems/mruby-object-ext/src/object.c @@ -4,7 +4,6 @@ #include #include #include -#include /* * call-seq: diff --git a/mrbgems/mruby-objectspace/src/mruby_objectspace.c b/mrbgems/mruby-objectspace/src/mruby_objectspace.c index 0d30e7f64..eeb23cc02 100644 --- a/mrbgems/mruby-objectspace/src/mruby_objectspace.c +++ b/mrbgems/mruby-objectspace/src/mruby_objectspace.c @@ -10,7 +10,6 @@ #include #include #include -#include struct os_count_struct { mrb_int total; diff --git a/mrbgems/mruby-pack/src/pack.c b/mrbgems/mruby-pack/src/pack.c index 4383e2a7e..5f466924d 100644 --- a/mrbgems/mruby-pack/src/pack.c +++ b/mrbgems/mruby-pack/src/pack.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-proc-binding/src/proc_binding.c b/mrbgems/mruby-proc-binding/src/proc_binding.c index 6838d223f..770237a68 100644 --- a/mrbgems/mruby-proc-binding/src/proc_binding.c +++ b/mrbgems/mruby-proc-binding/src/proc_binding.c @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c index f9be0ef29..14c42a790 100644 --- a/mrbgems/mruby-proc-ext/src/proc.c +++ b/mrbgems/mruby-proc-ext/src/proc.c @@ -6,7 +6,6 @@ #include #include #include -#include /* * call-seq: diff --git a/mrbgems/mruby-random/src/random.c b/mrbgems/mruby-random/src/random.c index fadd77abb..b65170ae8 100644 --- a/mrbgems/mruby-random/src/random.c +++ b/mrbgems/mruby-random/src/random.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/mrbgems/mruby-range-ext/src/range.c b/mrbgems/mruby-range-ext/src/range.c index 1c0acc1c2..2a88e321a 100644 --- a/mrbgems/mruby-range-ext/src/range.c +++ b/mrbgems/mruby-range-ext/src/range.c @@ -2,7 +2,6 @@ #include #include #include -#include static mrb_bool r_less(mrb_state *mrb, mrb_value a, mrb_value b, mrb_bool excl) diff --git a/mrbgems/mruby-rational/src/rational.c b/mrbgems/mruby-rational/src/rational.c index 951d6bfe3..4d265647f 100644 --- a/mrbgems/mruby-rational/src/rational.c +++ b/mrbgems/mruby-rational/src/rational.c @@ -2,7 +2,6 @@ #include #include #include -#include #ifndef MRB_NO_FLOAT #include diff --git a/mrbgems/mruby-set/src/set.c b/mrbgems/mruby-set/src/set.c index 21fc84d8e..82eec5b1b 100644 --- a/mrbgems/mruby-set/src/set.c +++ b/mrbgems/mruby-set/src/set.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-sleep/src/sleep.c b/mrbgems/mruby-sleep/src/sleep.c index 1183e10ec..292564de7 100644 --- a/mrbgems/mruby-sleep/src/sleep.c +++ b/mrbgems/mruby-sleep/src/sleep.c @@ -37,7 +37,6 @@ #endif #include -#include /* * call-seq: diff --git a/mrbgems/mruby-socket/src/socket.c b/mrbgems/mruby-socket/src/socket.c index efbba6ed8..815bc2402 100644 --- a/mrbgems/mruby-socket/src/socket.c +++ b/mrbgems/mruby-socket/src/socket.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "socket_hal.h" diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index bab3986b2..66f960d77 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/mrbgems/mruby-strftime/src/strftime.c b/mrbgems/mruby-strftime/src/strftime.c index 02a2d8675..94d659a1f 100644 --- a/mrbgems/mruby-strftime/src/strftime.c +++ b/mrbgems/mruby-strftime/src/strftime.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include diff --git a/mrbgems/mruby-string-ext/src/string.c b/mrbgems/mruby-string-ext/src/string.c index 451882c30..331aae7f1 100644 --- a/mrbgems/mruby-string-ext/src/string.c +++ b/mrbgems/mruby-string-ext/src/string.c @@ -5,7 +5,6 @@ #include #include #include -#include #define ENC_ASCII_8BIT "ASCII-8BIT" #define ENC_BINARY "BINARY" diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 3ba721ac5..4bd0129a0 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -14,7 +14,6 @@ #include #include #include -#include #define RSTRUCT_LEN(st) RARRAY_LEN(st) #define RSTRUCT_PTR(st) RARRAY_PTR(st) diff --git a/mrbgems/mruby-symbol-ext/src/symbol.c b/mrbgems/mruby-symbol-ext/src/symbol.c index 5825d0c62..ed4521ea0 100644 --- a/mrbgems/mruby-symbol-ext/src/symbol.c +++ b/mrbgems/mruby-symbol-ext/src/symbol.c @@ -3,7 +3,6 @@ #include #include #include -#include /* * call-seq: diff --git a/mrbgems/mruby-task/src/task.c b/mrbgems/mruby-task/src/task.c index 964969ab6..a8a627409 100644 --- a/mrbgems/mruby-task/src/task.c +++ b/mrbgems/mruby-task/src/task.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index 458f91d23..291e3d11e 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -11,7 +11,6 @@ #include #include #include -#include #ifdef MRB_NO_STDIO #include diff --git a/src/array.c b/src/array.c index 27a5b0097..cf28c35d0 100644 --- a/src/array.c +++ b/src/array.c @@ -11,7 +11,6 @@ #include #include #include -#include #include "value_array.h" #define ARY_DEFAULT_LEN 4 diff --git a/src/backtrace.c b/src/backtrace.c index c9d176785..ce4d9b140 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -15,7 +15,6 @@ #include #include #include -#include #define MAX_IREP_REFCNT UINT16_MAX #define UNKNOWN_LINENO -1 diff --git a/src/cdump.c b/src/cdump.c index 530a808fc..c453dfb97 100644 --- a/src/cdump.c +++ b/src/cdump.c @@ -456,7 +456,6 @@ mrb_dump_irep_cstruct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE "#include \n" "#include \n" "#include \n" - "#include \n" "\n") < 0) { return MRB_DUMP_WRITE_FAULT; } diff --git a/src/class.c b/src/class.c index 1f95a08d6..cc6da75a3 100644 --- a/src/class.c +++ b/src/class.c @@ -17,7 +17,6 @@ #include #include #include -#include /* mrb_mt_tbl, union mrb_mt_ptr, mrb_mt_entry defined in internal.h */ #define MT_PROTECTED MRB_METHOD_PROTECTED_FL diff --git a/src/enum.c b/src/enum.c index c2720bf78..8ca563bc7 100644 --- a/src/enum.c +++ b/src/enum.c @@ -6,7 +6,6 @@ #include #include -#include /* internal method `__update_hash(oldhash, index, itemhash)` */ static mrb_value diff --git a/src/error.c b/src/error.c index 2115f3f5b..cce382537 100644 --- a/src/error.c +++ b/src/error.c @@ -16,7 +16,6 @@ #include #include #include -#include void mrb_exc_mesg_set(mrb_state *mrb, struct RException *exc, mrb_value mesg) diff --git a/src/gc.c b/src/gc.c index 1206eaa6c..411cb6852 100644 --- a/src/gc.c +++ b/src/gc.c @@ -22,7 +22,6 @@ #include #include #include -#include #ifdef MRB_GC_STRESS #include diff --git a/src/hash.c b/src/hash.c index 084d98a6c..1dba928be 100644 --- a/src/hash.c +++ b/src/hash.c @@ -13,7 +13,6 @@ #include #include #include -#include /* diff --git a/src/kernel.c b/src/kernel.c index e7cd65834..315124cba 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -14,7 +14,6 @@ #include #include #include -#include /* * Checks if the method `mid` for object `obj` is implemented by diff --git a/src/numeric.c b/src/numeric.c index 5233a28b7..7c6b08469 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #ifndef MRB_NO_FLOAT diff --git a/src/numops.c b/src/numops.c index ff8adc2d6..9da0c3ae4 100644 --- a/src/numops.c +++ b/src/numops.c @@ -7,7 +7,6 @@ #include #include #include -#include MRB_API mrb_value mrb_num_add(mrb_state *mrb, mrb_value x, mrb_value y) diff --git a/src/object.c b/src/object.c index 6d2845103..da8ddb5e5 100644 --- a/src/object.c +++ b/src/object.c @@ -10,7 +10,6 @@ #include #include #include -#include /* * Checks if two mruby values, `v1` and `v2`, are identical. diff --git a/src/print.c b/src/print.c index 8d7bdcdfa..c54fa2049 100644 --- a/src/print.c +++ b/src/print.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #if defined(_WIN32) # include diff --git a/src/proc.c b/src/proc.c index 93cf46c5b..546d94907 100644 --- a/src/proc.c +++ b/src/proc.c @@ -12,7 +12,6 @@ #include #include #include -#include static const mrb_code call_iseq[] = { OP_CALL, diff --git a/src/range.c b/src/range.c index bd501ca8d..7a0e13890 100644 --- a/src/range.c +++ b/src/range.c @@ -11,7 +11,6 @@ #include #include #include -#include #define RANGE_INITIALIZED_FLAG 1 #define RANGE_INITIALIZED(p) ((p)->flags |= RANGE_INITIALIZED_FLAG) diff --git a/src/string.c b/src/string.c index def95e535..d490ec310 100644 --- a/src/string.c +++ b/src/string.c @@ -16,7 +16,6 @@ #include #include #include -#include #include typedef struct mrb_shared_string { diff --git a/src/symbol.c b/src/symbol.c index 01c7cb6ec..f24987e17 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -10,7 +10,6 @@ #include #include #include -#include #ifndef MRB_PRESYM_SCANNING /* const uint16_t presym_length_table[] */ diff --git a/src/variable.c b/src/variable.c index a40353ce4..45e4e02ea 100644 --- a/src/variable.c +++ b/src/variable.c @@ -11,7 +11,6 @@ #include #include #include -#include /* Instance variable table structure */ typedef struct iv_tbl { diff --git a/src/vm.c b/src/vm.c index d311a5800..f898287d8 100644 --- a/src/vm.c +++ b/src/vm.c @@ -20,7 +20,6 @@ #include #include #include -#include #ifdef MRB_NO_STDIO #if defined(__cplusplus)