Add support for "$owner" expansion in "out" typemaps

This is going to be used for the upcoming shared_ptr<> support.
This commit is contained in:
Vadim Zeitlin 2019-08-05 20:43:09 +02:00
commit 70bc33a3be

View file

@ -1014,6 +1014,7 @@ public:
String *tm;
if ((tm = Swig_typemap_lookup_out("out", n, "cppresult", wrapper, action))) {
Replaceall(tm, "$result", "result");
Replaceall(tm, "$owner", GetFlag(n, "feature:new") ? "1" : "0");
Printf(wrapper->code, "%s", tm);
if (Len(tm))
Printf(wrapper->code, "\n");