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:
parent
3efea1f4ab
commit
ef8a92578b
1 changed files with 7 additions and 7 deletions
|
|
@ -1098,13 +1098,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!SWIG_IsOK(res) && obj == Py_None) {
|
||||
if (ptr)
|
||||
*ptr = 0;
|
||||
if (PyErr_Occurred())
|
||||
PyErr_Clear();
|
||||
res = SWIG_OK;
|
||||
if (!SWIG_IsOK(res) && obj == Py_None) {
|
||||
if (ptr)
|
||||
*ptr = 0;
|
||||
if (PyErr_Occurred())
|
||||
PyErr_Clear();
|
||||
res = SWIG_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue