@@ -236,7 +236,7 @@ static PyObject *
236236CDataType_from_address (PyObject * type , PyObject * value )
237237{
238238 void * buf ;
239- if (!PyInt_Check (value ) && ! PyLong_Check ( value ) ) {
239+ if (!PyInt_Check (value )) {
240240 PyErr_SetString (PyExc_TypeError ,
241241 "integer expected" );
242242 return NULL ;
@@ -265,7 +265,7 @@ CDataType_in_dll(PyObject *type, PyObject *args)
265265 obj = PyObject_GetAttrString (dll , "_handle" );
266266 if (!obj )
267267 return NULL ;
268- if (!PyInt_Check (obj ) && ! PyLong_Check ( obj ) ) {
268+ if (!PyInt_Check (obj )) {
269269 PyErr_SetString (PyExc_TypeError ,
270270 "the _handle attribute of the second argument must be an integer" );
271271 Py_DECREF (obj );
@@ -1233,7 +1233,7 @@ c_void_p_from_param(PyObject *type, PyObject *value)
12331233 }
12341234 /* Should probably allow buffer interface as well */
12351235/* int, long */
1236- if (PyInt_Check (value ) || PyLong_Check ( value ) ) {
1236+ if (PyInt_Check (value )) {
12371237 PyCArgObject * parg ;
12381238 struct fielddesc * fd = getentry ("P" );
12391239
@@ -2697,7 +2697,7 @@ static int
26972697_get_name (PyObject * obj , char * * pname )
26982698{
26992699#ifdef MS_WIN32
2700- if (PyInt_Check (obj ) || PyLong_Check ( obj ) ) {
2700+ if (PyInt_Check (obj )) {
27012701 /* We have to use MAKEINTRESOURCEA for Windows CE.
27022702 Works on Windows as well, of course.
27032703 */
@@ -2734,7 +2734,7 @@ CFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
27342734 obj = PyObject_GetAttrString (dll , "_handle" );
27352735 if (!obj )
27362736 return NULL ;
2737- if (!PyInt_Check (obj ) && ! PyLong_Check ( obj ) ) {
2737+ if (!PyInt_Check (obj )) {
27382738 PyErr_SetString (PyExc_TypeError ,
27392739 "the _handle attribute of the second argument must be an integer" );
27402740 Py_DECREF (obj );
@@ -2859,8 +2859,7 @@ CFuncPtr_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
28592859#endif
28602860
28612861 if (1 == PyTuple_GET_SIZE (args )
2862- && (PyInt_Check (PyTuple_GET_ITEM (args , 0 ))
2863- || PyLong_Check (PyTuple_GET_ITEM (args , 0 )))) {
2862+ && (PyInt_Check (PyTuple_GET_ITEM (args , 0 )))) {
28642863 CDataObject * ob ;
28652864 void * ptr = PyLong_AsVoidPtr (PyTuple_GET_ITEM (args , 0 ));
28662865 if (ptr == NULL )
0 commit comments