summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-21 19:22:49 +0900
committerGitHub <[email protected]>2020-11-21 19:22:49 +0900
commit544784effd251656f7b406bc94880e1ef75af7b5 (patch)
treefdd4f269992d92bc35fb8c3cf67127d1573fb22c /include
parente3b91b8d415852777f9a10224efeb92edc37c19a (diff)
parenta045b6b8d93f70d7bf57a94ed5c7e0432190d584 (diff)
downloadmruby-544784effd251656f7b406bc94880e1ef75af7b5.tar.gz
mruby-544784effd251656f7b406bc94880e1ef75af7b5.zip
Merge pull request #5157 from dearblue/detect-rb-mrb
Allow to mixed and specify `*.rb` and `*.mrb` in `bin/mruby`
Diffstat (limited to 'include')
-rw-r--r--include/mruby/compile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mruby/compile.h b/include/mruby/compile.h
index 36adf5a32..ce874da6b 100644
--- a/include/mruby/compile.h
+++ b/include/mruby/compile.h
@@ -116,6 +116,7 @@ struct mrb_parser_state {
mrb_ast_node *cells;
const char *s, *send;
#ifndef MRB_DISABLE_STDIO
+ /* If both f and s are non-null, it will be taken preferentially from s until s < send. */
FILE *f;
#endif
mrbc_context *cxt;
@@ -193,6 +194,7 @@ MRB_API mrb_value mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc
#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);
+MRB_API mrb_value mrb_load_detect_file_cxt(mrb_state *mrb, FILE *fp, mrbc_context *c);
#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, size_t len);