diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2018-12-29 12:09:04 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-12-29 12:09:04 +0000 |
commit | ef8a92578b79d624eaa60a1417201cffb0b898b7 (patch) | |
tree | 250e0b63689ef5184d1d3bbbd200c3a40fbacfd7 /Lib/python | |
parent | 3efea1f4abe747e60549336cdbb1ff73f438ab06 (diff) | |
download | swig-ef8a92578b79d624eaa60a1417201cffb0b898b7.tar.gz |
Correct Python implicitconv code
Py_None is only possible with implicitconv so move this block of code
into the implicitconv if block.
Diffstat (limited to 'Lib/python')
-rw-r--r-- | Lib/python/pyrun.swg | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 0759b8f27..ad1b81963 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -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; |