From 70bc33a3be0af5a3d47b39ae96ecd62f9f70d3df Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Aug 2019 20:43:09 +0200 Subject: [PATCH] Add support for "$owner" expansion in "out" typemaps This is going to be used for the upcoming shared_ptr<> support. --- Source/Modules/c.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Modules/c.cxx b/Source/Modules/c.cxx index 70d850fd8..e5fe50222 100644 --- a/Source/Modules/c.cxx +++ b/Source/Modules/c.cxx @@ -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");