diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-25 19:32:03 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-25 19:32:03 -0800 |
commit | 8f0a9149536d951fc9d18e473d57a39efe3d9b7d (patch) | |
tree | 9f8a0e548639a39c555570a3744fea8a5bcbdb08 /062scheduler.cc | |
parent | 50c4ac802eec5730d9dedc73fb51a34b73063f71 (diff) | |
download | mu-8f0a9149536d951fc9d18e473d57a39efe3d9b7d.tar.gz |
2603 - bugfix: defining main with commandline args
Pretty hacky fix: we simply suppress static dispatch for main.
Diffstat (limited to '062scheduler.cc')
-rw-r--r-- | 062scheduler.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/062scheduler.cc b/062scheduler.cc index a68646d7..ca22caae 100644 --- a/062scheduler.cc +++ b/062scheduler.cc @@ -112,18 +112,17 @@ Current_routine = NULL; :(replace{} "void run_main(int argc, char* argv[])") void run_main(int argc, char* argv[]) { recipe_ordinal r = get(Recipe_ordinal, "main"); - if (r) { - routine* main_routine = new routine(r); - // pass in commandline args as ingredients to main - // todo: test this - Current_routine = main_routine; - for (long long int i = 1; i < argc; ++i) { - vector<double> arg; - arg.push_back(new_mu_string(argv[i])); - current_call().ingredient_atoms.push_back(arg); - } - run(main_routine); + assert(r); + routine* main_routine = new routine(r); + // pass in commandline args as ingredients to main + // todo: test this + Current_routine = main_routine; + for (long long int i = 1; i < argc; ++i) { + vector<double> arg; + arg.push_back(new_mu_string(argv[i])); + current_call().ingredient_atoms.push_back(arg); } + run(main_routine); } //:: To schedule new routines to run, call 'start-running'. |