aboutsummaryrefslogtreecommitdiff
path: root/Lib/python
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2018-12-29 12:09:04 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2018-12-29 12:09:04 +0000
commitef8a92578b79d624eaa60a1417201cffb0b898b7 (patch)
tree250e0b63689ef5184d1d3bbbd200c3a40fbacfd7 /Lib/python
parent3efea1f4abe747e60549336cdbb1ff73f438ab06 (diff)
downloadswig-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.swg14
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;