aboutsummaryrefslogtreecommitdiff
path: root/Lib/python/pywstrings.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/python/pywstrings.swg')
-rw-r--r--Lib/python/pywstrings.swg4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/python/pywstrings.swg b/Lib/python/pywstrings.swg
index 619bdd555..864376b01 100644
--- a/Lib/python/pywstrings.swg
+++ b/Lib/python/pywstrings.swg
@@ -18,9 +18,7 @@ SWIG_AsWCharPtrAndSize(PyObject *obj, wchar_t **cptr, size_t *psize, int *alloc)
int isunicode = PyUnicode_Check(obj);
%#if PY_VERSION_HEX < 0x03000000
if (!isunicode && PyString_Check(obj)) {
- if (cptr) {
- obj = tmp = PyUnicode_FromObject(obj);
- }
+ obj = tmp = PyUnicode_FromObject(obj);
isunicode = 1;
}
%#endif