Don't set tp_compare on Python 3

The slot is unused in Py < 3.5, and replaced by pg_as_async in Py 3.5.
This commit is contained in:
Daniele Varrazzo 2016-12-29 21:43:04 +01:00
parent e9577e9b89
commit a81f12f9bd

View File

@ -491,7 +491,11 @@ PyTypeObject typecastType = {
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_VERSION_HEX < 0x03000000
typecast_cmp, /*tp_compare*/
#else
0, /*tp_reserved*/
#endif
typecast_repr, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/