summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2015-12-12 06:57:13 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2015-12-12 06:57:13 (GMT)
commitf0c0318cdc72cbc65014f3a550efb4c8a737b9e3 (patch)
tree0540059314bed01d1b48ae9dfa6cea65ba19b63b /Modules
parent6a109365eca5ce01f708d8499840721b68f58a8f (diff)
downloadcpython-f0c0318cdc72cbc65014f3a550efb4c8a737b9e3.zip
cpython-f0c0318cdc72cbc65014f3a550efb4c8a737b9e3.tar.gz
cpython-f0c0318cdc72cbc65014f3a550efb4c8a737b9e3.tar.bz2
Issue #25845: Drop redundant checks leftover from int to long conversion
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/cfield.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index 3c7a52a..8cb6d66 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1375,7 +1375,7 @@ Z_set(void *ptr, PyObject *value, Py_ssize_t size)
Py_INCREF(value);
return value;
}
- if (PyLong_Check(value) || PyLong_Check(value)) {
+ if (PyLong_Check(value)) {
#if SIZEOF_VOID_P == SIZEOF_LONG_LONG
*(wchar_t **)ptr = (wchar_t *)PyLong_AsUnsignedLongLongMask(value);
#else
@@ -1491,7 +1491,7 @@ P_set(void *ptr, PyObject *value, Py_ssize_t size)
_RET(value);
}
- if (!PyLong_Check(value) && !PyLong_Check(value)) {
+ if (!PyLong_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"cannot be converted to pointer");
return NULL;