Issue #25845: Merge PyLong_Check() cleanup from 3.5

This commit is contained in:
Martin Panter 2015-12-12 07:14:03 +00:00
commit ad587f96a3
1 changed files with 2 additions and 2 deletions

View File

@ -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;