Created
September 18, 2015 16:06
-
-
Save scalone/6f74f9da2e4f19edcb52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static mrb_value | |
mrb_mrb_eval(mrb_state *mrb, mrb_value self) | |
{ | |
mrb_state *mrb2=NULL; | |
mrbc_context *c; | |
mrb_value code, ret, mrb_ret = mrb_nil_value(); | |
mrb_get_args(mrb, "S", &code); | |
mrb2 = mrb_open(); | |
c = mrbc_context_new(mrb2); | |
ret = mrb_load_string_cxt(mrb2, RSTRING_PTR(code), c); | |
/*...*/ | |
mrb_close(mrb2); | |
return mrb_ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment