There is no `PyInt_Check` in Python 3 as all int objects became long objects. In order to work with Python 3 as well as with int objects in Python2, that code must look like below:

```c
if (!PyLong_Check(value))
#if PY_MAJOR_VERSION < 3
	if (!PyInt_Check(value))
#endif
	{
		PyErr_SetString(PyExc_TypeError, "must be integer");
		return -1;
	}
}
```