summaryrefslogtreecommitdiff
path: root/src/codegen.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-07-31 19:25:34 +0000
committerAdrian Thurston <thurston@complang.org>2012-07-31 19:25:34 +0000
commit08343d0ee997c788a720a4c9756161dc8f881b15 (patch)
tree697fce2e94d94607bef74f87177a65582cac92b2 /src/codegen.cc
parentd5a996a46e9244c363f93d346ae532ded759fccf (diff)
downloadcolm-08343d0ee997c788a720a4c9756161dc8f881b15.tar.gz
pass program arguments to colmRunProgram instead of colmNewProgram.
Idea with this is to make it possible to re-use an allocated program for more than one invocation.
Diffstat (limited to 'src/codegen.cc')
-rw-r--r--src/codegen.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.cc b/src/codegen.cc
index 4403cf8f..f55257e7 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -37,8 +37,8 @@ void FsmCodeGen::writeMain()
" struct ColmProgram *prg;\n"
" int exitStatus;\n"
" colmInit( " << colmActiveRealm << " );\n"
- " prg = colmNewProgram( &main_runtimeData, argc, argv );\n"
- " colmRunProgram( prg );\n"
+ " prg = colmNewProgram( &main_runtimeData );\n"
+ " colmRunProgram( prg, argc, argv );\n"
" exitStatus = colmDeleteProgram( prg );\n"
" return exitStatus;\n"
"}\n"