Merge pull request #6733 from mruby/fix/presym-include

This commit is contained in:
Yukihiro "Matz" Matsumoto
2026-03-10 16:59:51 +09:00
committed by GitHub
71 changed files with 3 additions and 75 deletions
-1
View File
@@ -79,7 +79,6 @@ Include `<mruby/class.h>` (which provides `mrb_mt_entry`,
```c
#include <mruby/class.h>
#include <mruby/presym.h>
static const mrb_mt_entry my_rom_entries[] = {
MRB_MT_ENTRY(my_method_a, MRB_SYM(method_a), MRB_ARGS_REQ(1)),
@@ -15,11 +15,6 @@
*/
#include <mruby/internal.h>
/*
* The "mruby/presym.h" file is placed at the end of the mruby header file.
*/
#include <mruby/presym.h>
/*
* Define your own struct RBigint.
*
+3 -1
View File
@@ -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 <mruby/presym.h>` 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 <mruby/presym/scanning.h>
#else
# include <mruby/presym.h>
#endif
#if 0
@@ -11,7 +11,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include "socket_hal.h"
#include <sys/types.h>
-1
View File
@@ -15,7 +15,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include "socket_hal.h"
#include <winsock2.h>
#include <ws2tcpip.h>
-1
View File
@@ -7,7 +7,6 @@
#include <mruby/data.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/khash.h>
#include <mruby/error.h>
@@ -12,7 +12,6 @@
#include <mruby/numeric.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "apiprint.h"
static void
-1
View File
@@ -19,7 +19,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include <stdlib.h>
@@ -12,7 +12,6 @@
#include <mruby/variable.h>
#include <mruby/proc.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#if defined(_WIN32)
# include <io.h> /* for setmode */
-1
View File
@@ -4,7 +4,6 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/variable.h>
#include <mruby/presym.h>
#include <mruby/opcode.h>
#include <mruby/debug.h>
#include <mruby/internal.h>
-1
View File
@@ -1,5 +1,4 @@
#include <mruby.h>
#include <mruby/presym.h>
static mrb_value
binding_in_c(mrb_state *mrb, mrb_value self)
-1
View File
@@ -4,7 +4,6 @@
#include <mruby/error.h>
#include <mruby/proc.h>
#include <mruby/opcode.h>
#include <mruby/presym.h>
/* 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))
-1
View File
@@ -5,7 +5,6 @@
#include <mruby/proc.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* Get the name of a module/class.
-1
View File
@@ -10,7 +10,6 @@
*/
#include <mruby.h>
#include <mruby/presym.h>
#ifdef MRB_NO_FLOAT
# error CMath conflicts with 'MRB_NO_FLOAT' configuration
-1
View File
@@ -46,7 +46,6 @@
#include <mruby/numeric.h>
#include <mruby/string.h>
#include <mruby/debug.h>
#include <mruby/presym.h>
#include "node.h"
#include <mruby/opcode.h>
#include <mruby/re.h>
-1
View File
@@ -23,7 +23,6 @@
#include <mruby/string.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "node.h"
#define YYLEX_PARAM p
-1
View File
@@ -85,7 +85,6 @@
#include <mruby/string.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "node.h"
#define YYLEX_PARAM p
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/class.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <float.h>
#ifdef MRB_NO_FLOAT
-1
View File
@@ -13,7 +13,6 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define RDATA_LEN(st) RARRAY_LEN(st)
#define RDATA_PTR(st) RARRAY_PTR(st)
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/data.h>
#include <mruby/error.h>
#include <mruby/string.h>
#include <mruby/presym.h>
#include "dir_hal.h"
#include <string.h>
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define ENC_ASCII_8BIT "ASCII-8BIT"
#define ENC_BINARY "BINARY"
-1
View File
@@ -7,7 +7,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <errno.h>
#include <string.h>
-1
View File
@@ -6,7 +6,6 @@
#include <mruby/proc.h>
#include <mruby/opcode.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
-1
View File
@@ -2,7 +2,6 @@
#include <mruby.h>
#include <mruby/error.h>
#include <mruby/variable.h>
#include <mruby/presym.h>
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
-1
View File
@@ -6,7 +6,6 @@
#include <mruby/numeric.h>
#include <mruby/proc.h>
#include <mruby/string.h>
#include <mruby/presym.h>
#define fiber_ptr(o) ((struct RFiber*)mrb_ptr(o))
-1
View File
@@ -9,7 +9,6 @@
#include <mruby/hash.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/io.h>
#include <mruby/error.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "io_hal.h"
#include <sys/types.h>
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/io.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include "io_hal.h"
-1
View File
@@ -12,7 +12,6 @@
#include <mruby/io.h>
#include <mruby/error.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "io_hal.h"
#include <sys/types.h>
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/proc.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -11,7 +11,6 @@
#endif
#include <mruby/array.h>
#include <mruby/presym.h>
static void
domain_error(mrb_state *mrb, const char *func)
-1
View File
@@ -7,7 +7,6 @@
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/khash.h>
#include <mruby/presym.h>
#define MT_PROTECTED MRB_METHOD_PROTECTED_FL
#define MT_NOPRIV (MRB_METHOD_PRIVATE_FL|MT_PROTECTED)
-1
View File
@@ -5,7 +5,6 @@
#include <mruby/proc.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
// Defined by mruby-proc-ext on which mruby-method depends
mrb_value mrb_proc_parameters(mrb_state *mrb, mrb_value proc);
@@ -4,7 +4,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifndef MRB_NO_FLOAT
static mrb_value flo_remainder(mrb_state *mrb, mrb_value self);
-1
View File
@@ -4,7 +4,6 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
@@ -10,7 +10,6 @@
#include <mruby/proc.h>
#include <mruby/value.h>
#include <mruby/range.h>
#include <mruby/presym.h>
struct os_count_struct {
mrb_int total;
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/variable.h>
#include <mruby/endian.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <ctype.h>
#include <string.h>
@@ -1,5 +1,4 @@
#include <mruby.h>
#include <mruby/presym.h>
#include <mruby/proc.h>
#include <mruby/variable.h>
-1
View File
@@ -6,7 +6,6 @@
#include <mruby/string.h>
#include <mruby/debug.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/data.h>
#include <mruby/array.h>
#include <mruby/istruct.h>
#include <mruby/presym.h>
#include <mruby/range.h>
#include <mruby/string.h>
#include <mruby/internal.h>
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/range.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
static mrb_bool
r_less(mrb_state *mrb, mrb_value a, mrb_value b, mrb_bool excl)
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/class.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifndef MRB_NO_FLOAT
#include <math.h>
-1
View File
@@ -13,7 +13,6 @@
#include <mruby/proc.h>
#include <mruby/data.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/error.h>
#include <mruby/khash.h>
-1
View File
@@ -37,7 +37,6 @@
#endif
#include <mruby.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -36,7 +36,6 @@
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/io.h>
#include "socket_hal.h"
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/hash.h>
#include <mruby/numeric.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include <string.h>
#include <ctype.h>
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/time.h>
#include <mruby/class.h>
#include <mruby/presym.h>
#include <time.h>
#include <string.h>
-1
View File
@@ -5,7 +5,6 @@
#include <mruby/string.h>
#include <mruby/range.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define ENC_ASCII_8BIT "ASCII-8BIT"
#define ENC_BINARY "BINARY"
-1
View File
@@ -14,7 +14,6 @@
#include <mruby/range.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define RSTRUCT_LEN(st) RARRAY_LEN(st)
#define RSTRUCT_PTR(st) RARRAY_PTR(st)
-1
View File
@@ -3,7 +3,6 @@
#include <mruby/class.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -12,7 +12,6 @@
#include <mruby/gc.h>
#include <mruby/hash.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/proc.h>
#include <mruby/string.h>
#include <mruby/variable.h>
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/time.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_NO_STDIO
#include <string.h>
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/range.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "value_array.h"
#define ARY_DEFAULT_LEN 4
-1
View File
@@ -15,7 +15,6 @@
#include <mruby/numeric.h>
#include <mruby/data.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define MAX_IREP_REFCNT UINT16_MAX
#define UNKNOWN_LINENO -1
-1
View File
@@ -456,7 +456,6 @@ mrb_dump_irep_cstruct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE
"#include <mruby/irep.h>\n"
"#include <mruby/debug.h>\n"
"#include <mruby/proc.h>\n"
"#include <mruby/presym.h>\n"
"\n") < 0) {
return MRB_DUMP_WRITE_FAULT;
}
-1
View File
@@ -17,7 +17,6 @@
#include <mruby/istruct.h>
#include <mruby/opcode.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/* mrb_mt_tbl, union mrb_mt_ptr, mrb_mt_entry defined in internal.h */
#define MT_PROTECTED MRB_METHOD_PROTECTED_FL
-1
View File
@@ -6,7 +6,6 @@
#include <mruby.h>
#include <mruby/proc.h>
#include <mruby/presym.h>
/* internal method `__update_hash(oldhash, index, itemhash)` */
static mrb_value
-1
View File
@@ -16,7 +16,6 @@
#include <mruby/class.h>
#include <mruby/throw.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
void
mrb_exc_mesg_set(mrb_state *mrb, struct RException *exc, mrb_value mesg)
-1
View File
@@ -22,7 +22,6 @@
#include <mruby/error.h>
#include <mruby/throw.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_GC_STRESS
#include <stdlib.h>
-1
View File
@@ -13,7 +13,6 @@
#include <mruby/variable.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
-1
View File
@@ -14,7 +14,6 @@
#include <mruby/error.h>
#include <mruby/istruct.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* Checks if the method `mid` for object `obj` is implemented by
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <string.h>
#ifndef MRB_NO_FLOAT
-1
View File
@@ -7,7 +7,6 @@
#include <mruby.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
MRB_API mrb_value
mrb_num_add(mrb_state *mrb, mrb_value x, mrb_value y)
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* Checks if two mruby values, `v1` and `v2`, are identical.
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <string.h>
#if defined(_WIN32)
# include <windows.h>
-1
View File
@@ -12,7 +12,6 @@
#include <mruby/array.h>
#include <mruby/hash.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
static const mrb_code call_iseq[] = {
OP_CALL,
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/array.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define RANGE_INITIALIZED_FLAG 1
#define RANGE_INITIALIZED(p) ((p)->flags |= RANGE_INITIALIZED_FLAG)
-1
View File
@@ -16,7 +16,6 @@
#include <mruby/string.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <string.h>
typedef struct mrb_shared_string {
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/dump.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifndef MRB_PRESYM_SCANNING
/* const uint16_t presym_length_table[] */
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/* Instance variable table structure */
typedef struct iv_tbl {
-1
View File
@@ -20,7 +20,6 @@
#include <mruby/throw.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_NO_STDIO
#if defined(__cplusplus)