mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add new function mrb_parser_free()
This commit is contained in:
@@ -98,6 +98,7 @@ struct mrb_parser_state {
|
||||
};
|
||||
|
||||
struct mrb_parser_state* mrb_parser_new(mrb_state*);
|
||||
void mrb_parser_free(struct mrb_parser_state*);
|
||||
const char *mrb_parser_filename(struct mrb_parser_state*, const char*);
|
||||
void mrb_parser_parse(struct mrb_parser_state*,mrbc_context*);
|
||||
|
||||
|
||||
@@ -4775,6 +4775,11 @@ mrb_parser_new(mrb_state *mrb)
|
||||
return p;
|
||||
}
|
||||
|
||||
void
|
||||
mrb_parser_free(parser_state *p) {
|
||||
mrb_pool_close(p->pool);
|
||||
}
|
||||
|
||||
mrbc_context*
|
||||
mrbc_context_new(mrb_state *mrb)
|
||||
{
|
||||
|
||||
+1
-1
@@ -231,7 +231,7 @@ main(void)
|
||||
memset(ruby_code, 0, sizeof(*ruby_code));
|
||||
memset(ruby_code, 0, sizeof(*last_code_line));
|
||||
}
|
||||
mrb_pool_close(parser->pool);
|
||||
mrb_parser_free(parser);
|
||||
}
|
||||
}
|
||||
mrbc_context_free(mrb, cxt);
|
||||
|
||||
Reference in New Issue
Block a user