diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-03 15:26:11 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-03 15:26:11 +0900 |
| commit | ce49d90dc82bc165880a800ae95dc327b729143f (patch) | |
| tree | d6f18ce188f307068e75950a79628ede4e26b54b /include | |
| parent | 97b1c57600b243e086114179cd61e3503beaa1e6 (diff) | |
| download | mruby-ce49d90dc82bc165880a800ae95dc327b729143f.tar.gz mruby-ce49d90dc82bc165880a800ae95dc327b729143f.zip | |
modify compiler API; replace mrb_compie_xxx with mrb_load_xxx() that combines compilatoin and execution
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/compile.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/mruby/compile.h b/include/mruby/compile.h index fa21d81a6..2ea141da8 100644 --- a/include/mruby/compile.h +++ b/include/mruby/compile.h @@ -94,9 +94,10 @@ struct mrb_parser_state* mrb_parse_string(mrb_state*,const char*); struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,int); int mrb_generate_code(mrb_state*, mrb_ast_node*); -int mrb_compile_file(mrb_state*,FILE*); -int mrb_compile_string(mrb_state*,const char*); -int mrb_compile_nstring(mrb_state*,const char*,int); +/* program load functions */ +mrb_value mrb_load_file(mrb_state*,FILE*); +mrb_value mrb_load_string(mrb_state *mrb, const char *path); +mrb_value mrb_load_nstring(mrb_state *mrb, const char *path, int len); #if defined(__cplusplus) } /* extern "C" { */ |
