From ce49d90dc82bc165880a800ae95dc327b729143f Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Tue, 3 Jul 2012 15:26:11 +0900 Subject: modify compiler API; replace mrb_compie_xxx with mrb_load_xxx() that combines compilatoin and execution --- include/mruby/compile.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') 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" { */ -- cgit v1.2.3