Add support for "ret" typemap where missing and improve documentation on it.

This commit is contained in:
William S Fulton 2016-09-29 08:06:22 +01:00
commit 08688d7d9d
11 changed files with 123 additions and 17 deletions

View file

@ -2097,6 +2097,13 @@ int R::functionWrapper(Node *n) {
}
}
/* See if there is any return cleanup code */
if ((tm = Swig_typemap_lookup("ret", n, Swig_cresult_name(), 0))) {
Replaceall(tm, "$source", Swig_cresult_name());
Printf(f->code, "%s\n", tm);
Delete(tm);
}
Printv(f->code, UnProtectWrapupCode, NIL);
/*If the user gave us something to convert the result in */