mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
DISABLE_STDIO/ENABLE_DEBUG macros to rename; close #3014
changes: * rename DISABLE_STDIO -> MRB_DISABLE_STDIO * rename ENABLE_DEBUG -> MRB_ENABLE_DEBUG_HOOK * no more opposite macro definitions (e.g. ENABLE_STDIO, DISABLE_DEBUG). * rewrite above macro references throughout the code. * update documents
This commit is contained in:
@@ -112,7 +112,7 @@ struct mrb_parser_state {
|
||||
struct mrb_pool *pool;
|
||||
mrb_ast_node *cells;
|
||||
const char *s, *send;
|
||||
#ifdef ENABLE_STDIO
|
||||
#ifndef MRB_DIABLE_STDIO
|
||||
FILE *f;
|
||||
#endif
|
||||
mrbc_context *cxt;
|
||||
@@ -167,7 +167,7 @@ MRB_API void mrb_parser_set_filename(struct mrb_parser_state*, char const*);
|
||||
MRB_API char const* mrb_parser_get_filename(struct mrb_parser_state*, uint16_t idx);
|
||||
|
||||
/* utility functions */
|
||||
#ifdef ENABLE_STDIO
|
||||
#ifndef MRB_DISABLE_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*);
|
||||
@@ -175,14 +175,12 @@ MRB_API struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,int,mr
|
||||
MRB_API struct RProc* mrb_generate_code(mrb_state*, struct mrb_parser_state*);
|
||||
|
||||
/* program load functions */
|
||||
#ifdef ENABLE_STDIO
|
||||
#ifndef MRB_DISABLE_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);
|
||||
#endif
|
||||
MRB_API mrb_value mrb_load_string(mrb_state *mrb, const char *s);
|
||||
MRB_API mrb_value mrb_load_nstring(mrb_state *mrb, const char *s, int len);
|
||||
#ifdef ENABLE_STDIO
|
||||
MRB_API mrb_value mrb_load_file_cxt(mrb_state*,FILE*, mrbc_context *cxt);
|
||||
#endif
|
||||
MRB_API mrb_value mrb_load_string_cxt(mrb_state *mrb, const char *s, mrbc_context *cxt);
|
||||
MRB_API mrb_value mrb_load_nstring_cxt(mrb_state *mrb, const char *s, int len, mrbc_context *cxt);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ MRB_BEGIN_DECL
|
||||
#define DUMP_ENDIAN_MASK 6
|
||||
|
||||
int mrb_dump_irep(mrb_state *mrb, mrb_irep *irep, uint8_t flags, uint8_t **bin, size_t *bin_size);
|
||||
#ifdef ENABLE_STDIO
|
||||
#ifndef MRB_DISABLE_STDIO
|
||||
int mrb_dump_irep_binary(mrb_state*, mrb_irep*, uint8_t, FILE*);
|
||||
int mrb_dump_irep_cfunc(mrb_state *mrb, mrb_irep*, uint8_t flags, FILE *f, const char *initname);
|
||||
mrb_irep *mrb_read_irep_file(mrb_state*, FILE*);
|
||||
|
||||
Reference in New Issue
Block a user