[Python-checkins] cpython (3.5): Issue #25845: Drop redundant checks leftover from int to long conversion
martin.panter
python-checkins at python.org
Sat Dec 12 02:31:23 EST 2015
https://hg.python.org/cpython/rev/26859a7e385c
changeset: 99535:26859a7e385c
branch: 3.5
user: Martin Panter <vadmium+py at gmail.com>
date: Sat Dec 12 06:57:13 2015 +0000
summary:
Issue #25845: Drop redundant checks leftover from int to long conversion
files:
Modules/_ctypes/cfield.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1375,7 +1375,7 @@
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 @@
_RET(value);
}
- if (!PyLong_Check(value) && !PyLong_Check(value)) {
+ if (!PyLong_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"cannot be converted to pointer");
return NULL;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list