summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-03-16 17:45:32 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2019-03-16 19:54:40 +0000
commitfec0a5587df4be1800e6b86926aed74308759e92 (patch)
treede8bad4fea172461f1201c38b2c07fbcf6120668
parentb9d0808f953a506cb5654350838d6417993eba06 (diff)
downloadpsycopg2-fec0a5587df4be1800e6b86926aed74308759e92.tar.gz
Fixed check for type == int on Py2
-rw-r--r--psycopg/adapter_pint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/adapter_pint.c b/psycopg/adapter_pint.c
index b712854..950b655 100644
--- a/psycopg/adapter_pint.c
+++ b/psycopg/adapter_pint.c
@@ -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
) {