Octave: fix bugs in output of cleanup code

Closes #35
This commit is contained in:
Karl Wette 2013-04-16 11:11:20 +02:00 committed by William S Fulton
commit 2a3e687c19
2 changed files with 12 additions and 1 deletions

View file

@ -744,10 +744,15 @@ public:
Delete(tm);
}
Printf(f->code, "fail:\n"); // we should free locals etc if this happens
Printf(f->code, "return _out;\n");
Printf(f->code, "fail:\n"); // we should free locals etc if this happens
Printv(f->code, cleanup, NIL);
Printf(f->code, "return octave_value_list();\n");
Printf(f->code, "}\n");
/* Substitute the cleanup code */
Replaceall(f->code, "$cleanup", cleanup);
Replaceall(f->code, "$symname", iname);
Wrapper_print(f, f_wrappers);
DelWrapper(f);