Fixed check for type == int on Py2

This commit is contained in:
Daniele Varrazzo 2019-03-16 17:45:32 +00:00
parent b9d0808f95
commit fec0a5587d

View File

@ -40,7 +40,7 @@ pint_getquoted(pintObject *self, PyObject *args)
/* Convert subclass to int to handle IntEnum and other subclasses
* whose str() is not the number. */
if (PyLong_CheckExact(self->wrapped)
#if PY_MAJOR_VERSION < 2
#if PY_2
|| PyInt_CheckExact(self->wrapped)
#endif
) {