mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Rename MRB_{ENABLE,DISABLE}_ to MRB_{USE,NO}_; close #5163
| Previous Name | New Name | |------------------------------|-------------------------| | MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI | | MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION | | MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK | | MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING | | MRB_DISABLE_STDIO | MRB_NO_STDIO | | ENABLE_LINENOISE | MRB_USE_LINENOISE | | ENABLE_READLINE | MRB_USE_READLINE | | DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE | | DISABLE_GEMS | MRB_NO_GEMS | * `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed. * `MRB_` prefix is added to those without. * The previous names can also be used for compatibility.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef MRB_ENABLE_CXX_ABI
|
||||
#ifdef MRB_USE_CXX_ABI
|
||||
#define MRB_BEGIN_DECL
|
||||
#define MRB_END_DECL
|
||||
#else
|
||||
|
||||
@@ -115,7 +115,7 @@ struct mrb_parser_state {
|
||||
struct mrb_pool *pool;
|
||||
mrb_ast_node *cells;
|
||||
const char *s, *send;
|
||||
#ifndef MRB_DISABLE_STDIO
|
||||
#ifndef MRB_NO_STDIO
|
||||
/* If both f and s are non-null, it will be taken preferentially from s until s < send. */
|
||||
FILE *f;
|
||||
#endif
|
||||
@@ -174,7 +174,7 @@ MRB_API void mrb_parser_set_filename(struct mrb_parser_state*, char const*);
|
||||
MRB_API mrb_sym mrb_parser_get_filename(struct mrb_parser_state*, uint16_t idx);
|
||||
|
||||
/* utility functions */
|
||||
#ifndef MRB_DISABLE_STDIO
|
||||
#ifndef MRB_NO_STDIO
|
||||
MRB_API struct mrb_parser_state* mrb_parse_file(mrb_state*,FILE*,mrbc_context*);
|
||||
#endif
|
||||
MRB_API struct mrb_parser_state* mrb_parse_string(mrb_state*,const char*,mrbc_context*);
|
||||
@@ -191,7 +191,7 @@ MRB_API mrb_value mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc
|
||||
* mrb_value status = mrb_load_string(mrb, buffer);
|
||||
* mrb_gc_arena_restore(mrb, ai);
|
||||
*/
|
||||
#ifndef MRB_DISABLE_STDIO
|
||||
#ifndef MRB_NO_STDIO
|
||||
MRB_API mrb_value mrb_load_file(mrb_state*,FILE*);
|
||||
MRB_API mrb_value mrb_load_file_cxt(mrb_state*,FILE*, mrbc_context *cxt);
|
||||
MRB_API mrb_value mrb_load_detect_file_cxt(mrb_state *mrb, FILE *fp, mrbc_context *c);
|
||||
|
||||
@@ -19,7 +19,7 @@ MRB_BEGIN_DECL
|
||||
#define DUMP_DEBUG_INFO 1
|
||||
|
||||
int mrb_dump_irep(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, uint8_t **bin, size_t *bin_size);
|
||||
#ifndef MRB_DISABLE_STDIO
|
||||
#ifndef MRB_NO_STDIO
|
||||
int mrb_dump_irep_binary(mrb_state*, const mrb_irep*, uint8_t, FILE*);
|
||||
int mrb_dump_irep_cfunc(mrb_state *mrb, const mrb_irep*, uint8_t flags, FILE *f, const char *initname);
|
||||
int mrb_dump_irep_cstruct(mrb_state *mrb, const mrb_irep*, uint8_t flags, FILE *f, const char *initname);
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
#ifndef MRB_THROW_H
|
||||
#define MRB_THROW_H
|
||||
|
||||
#if defined(MRB_ENABLE_CXX_ABI)
|
||||
#if defined(MRB_USE_CXX_ABI)
|
||||
# if !defined(__cplusplus)
|
||||
# error Trying to use C++ exception handling in C code
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(MRB_ENABLE_CXX_EXCEPTION)
|
||||
#if defined(MRB_USE_CXX_EXCEPTION)
|
||||
|
||||
# if defined(__cplusplus)
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef mrb_int mrb_jmpbuf_impl;
|
||||
struct mrb_jmpbuf {
|
||||
mrb_jmpbuf_impl impl;
|
||||
|
||||
#if defined(MRB_ENABLE_CXX_EXCEPTION)
|
||||
#if defined(MRB_USE_CXX_EXCEPTION)
|
||||
static mrb_int jmpbuf_id;
|
||||
# if defined(__cplusplus)
|
||||
mrb_jmpbuf() : impl(jmpbuf_id++) {}
|
||||
|
||||
Reference in New Issue
Block a user