Created
June 29, 2014 19:01
-
-
Save fkaa/9f6c4e40a2ee36594a30 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| void try_call_argv(const char* fn, int argc, ...) { | |
| mrb_value argv[argc]; | |
| va_list ap; | |
| va_start(ap, argc); | |
| for (i = 0; i < argc; i++) { | |
| argv[i] = va_arg(ap, mrb_value); | |
| } | |
| va_end(ap); | |
| if (fnlookup.count(fn)) { | |
| mrb_funcall(mrb, fnlookup.at(fn), "call", argc, argv); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment