[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

@ -275,7 +275,9 @@ SWIG_Python_FixMethods(PyMethodDef *methods,
size_t i;
for (i = 0; methods[i].ml_name; ++i) {
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;
swig_const_info *ci = 0;
const char *name = c + 10;