Skip to content

Commit

Permalink
Add cleanup code (copy and modify from tcl.cxx)
Browse files Browse the repository at this point in the history
  • Loading branch information
YungLee committed Apr 29, 2013
1 parent 680374f commit 0a66805
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/Modules/scilab.cxx
Expand Up @@ -357,6 +357,20 @@ class SCILAB : public Language {
}
}
/* Add cleanup code */
for (param = functionParamsList; param;) {
String *tm;
if ((tm = Getattr(param, "tmap:freearg"))) {
if (tm && (Len(tm) != 0)) {
Replaceall(tm, "$source", Getattr(param, "lname"));
Printf(wrapper->code, "%s\n", tm);
Delete(tm);
}
param= Getattr(param, "tmap:freearg:next");
} else {
param = nextSibling(param);
}
}


/* Close the function(ok) */
Printv(wrapper->code, "return SWIG_OK;\n", NIL);
Expand Down

0 comments on commit 0a66805

Please sign in to comment.