Correct Python implicitconv code

Py_None is only possible with implicitconv so move this block of code
into the implicitconv if block.
This commit is contained in:
William S Fulton 2018-12-29 12:09:04 +00:00
commit ef8a92578b

View file

@ -1098,13 +1098,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
} }
} }
} if (!SWIG_IsOK(res) && obj == Py_None) {
if (!SWIG_IsOK(res) && obj == Py_None) { if (ptr)
if (ptr) *ptr = 0;
*ptr = 0; if (PyErr_Occurred())
if (PyErr_Occurred()) PyErr_Clear();
PyErr_Clear(); res = SWIG_OK;
res = SWIG_OK; }
} }
} }
return res; return res;