[Python-checkins] cpython (merge 3.5 -> default): Issue #25845: Merge PyLong_Check() cleanup from 3.5

martin.panter python-checkins at python.org
Sat Dec 12 02:31:24 EST 2015


https://hg.python.org/cpython/rev/9be59ad8af80
changeset:   99538:9be59ad8af80
parent:      99537:7c5c03143923
parent:      99535:26859a7e385c
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Dec 12 07:14:03 2015 +0000
summary:
  Issue #25845: Merge PyLong_Check() cleanup from 3.5

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