From be9d736597e359480dd98d05612e5dbc4747dd6d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 18 Feb 2019 19:28:35 +0000 Subject: [PATCH] Add back-reference to changes file --- CHANGES.current | 9 +++++++++ Doc/Manual/CSharp.html | 2 +- Doc/Manual/Java.html | 2 +- Doc/Manual/Python.html | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index e26366a74..6d7b0ca46 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,15 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.0.0 (in progress) =========================== +2019-02-18: jakecobb + [Python] #945 #1234 Elements in std::vector memory access fix. + + Accessing an element in a std::vector obtains a reference to the element via an + iterator pointing to the element in the container. If the vector is garbage collected, + the SWIG wrapper containing the pointer to the element becomes invalid. The fix is + to obtain a back-reference to the container by the wrapper to the element in the Python + layer to prevent the garbage collector from destroying the underlying container. + 2019-02-17: wsfulton Fix typemap matching to expand template parameters when the name contains template parameters. In the %typemap below the type is T and the name is X::make diff --git a/Doc/Manual/CSharp.html b/Doc/Manual/CSharp.html index a4e0be799..7a9b7470b 100644 --- a/Doc/Manual/CSharp.html +++ b/Doc/Manual/CSharp.html @@ -1828,7 +1828,7 @@ Consider the following C++ code:
 struct Wheel {
   int size;
-  Wheel(int sz) : size(sz) {}
+  Wheel(int sz = 0) : size(sz) {}
 };
 
 class Bike {
diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html
index 4c7b6d058..bf77c1562 100644
--- a/Doc/Manual/Java.html
+++ b/Doc/Manual/Java.html
@@ -8295,7 +8295,7 @@ Consider the following C++ code:
 
 struct Wheel {
   int size;
-  Wheel(int sz) : size(sz) {}
+  Wheel(int sz = 0) : size(sz) {}
 };
 
 class Bike {
diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
index 20e95775f..6a174fddf 100644
--- a/Doc/Manual/Python.html
+++ b/Doc/Manual/Python.html
@@ -5452,7 +5452,7 @@ Consider the following C++ code:
 #include <iostream>
 struct Wheel {
   int size;
-  Wheel(int sz) : size(sz) {}
+  Wheel(int sz = 0) : size(sz) {}
   ~Wheel() { std::cout << "~Wheel" << std::endl; }
 };