[Go] Fix use of goout typemap when calling base method by

forcing the "type" attribute to the value we need.
This commit is contained in:
Ian Lance Taylor 2016-04-18 15:30:06 -07:00
commit 0f54384ee3
4 changed files with 55 additions and 0 deletions

View file

@ -1362,6 +1362,10 @@ private:
goargout(info->parms);
if (SwigType_type(info->result) != T_VOID) {
Swig_save("cgoGoWrapper", info->n, "type", "tmap:goout", NULL);
Setattr(info->n, "type", info->result);
String *goout = goTypemapLookup("goout", info->n, "swig_r");
if (goout == NULL) {
Printv(f_go_wrappers, "\treturn swig_r\n", NULL);
@ -1374,6 +1378,8 @@ private:
Printv(f_go_wrappers, goout, "\n", NULL);
Printv(f_go_wrappers, "\treturn swig_r_1\n", NULL);
}
Swig_restore(info->n);
}
Printv(f_go_wrappers, "}\n\n", NULL);