[Python] Fix warning when compiling generated code with MSVC.

Fixes https://sourceforge.net/p/swig/patches/351/ reported by Mateusz
Szymański).
This commit is contained in:
Olly Betts 2015-05-19 15:48:25 +12:00
commit a89a4d9e84
2 changed files with 8 additions and 1 deletions

View file

@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.6 (in progress) Version 3.0.6 (in progress)
=========================== ===========================
2015-05-19: olly
[Python] Fix warning when compiling generated code with MSVC.
(Fixes https://sourceforge.net/p/swig/patches/351/ reported by
Mateusz Szymański).
2015-05-14: wsfulton 2015-05-14: wsfulton
Fix seg fault wrapping shared_ptr of classes with private constructors and destructors. Fix seg fault wrapping shared_ptr of classes with private constructors and destructors.
This also fixes the "unref" feature when used on classes with private destructors. This also fixes the "unref" feature when used on classes with private destructors.

View file

@ -275,7 +275,9 @@ SWIG_Python_FixMethods(PyMethodDef *methods,
size_t i; size_t i;
for (i = 0; methods[i].ml_name; ++i) { for (i = 0; methods[i].ml_name; ++i) {
const char *c = methods[i].ml_doc; const char *c = methods[i].ml_doc;
if (c && (c = strstr(c, "swig_ptr: "))) { if (!c) continue;
c = strstr(c, "swig_ptr: ");
if (c) {
int j; int j;
swig_const_info *ci = 0; swig_const_info *ci = 0;
const char *name = c + 10; const char *name = c + 10;