summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-03-31 23:54:20 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-03-31 23:54:20 +0200
commitb201097a42bc35de39a000b566f88f49ba2af172 (patch)
tree02de5939304dbbcf2dc20efd249df1bc90658b4f
parent78f5cc159afb76d35b703bd6f3d1adcdc96bdd8a (diff)
downloadpygobject-b201097a42bc35de39a000b566f88f49ba2af172.tar.gz
enum/flags: use the tp_hash from the right base class
I missed that on Python 2 we subclass int.
-rw-r--r--gi/pygenum.c2
-rw-r--r--gi/pygflags.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gi/pygenum.c b/gi/pygenum.c
index dd324700..0e7c1e31 100644
--- a/gi/pygenum.c
+++ b/gi/pygenum.c
@@ -376,7 +376,7 @@ pygi_enum_register_types(PyObject *d)
PyGEnum_Type.tp_base = &PYGLIB_PyLong_Type;
PyGEnum_Type.tp_new = pyg_enum_new;
- PyGEnum_Type.tp_hash = PyLong_Type.tp_hash;
+ PyGEnum_Type.tp_hash = PYGLIB_PyLong_Type.tp_hash;
PyGEnum_Type.tp_repr = (reprfunc)pyg_enum_repr;
PyGEnum_Type.tp_str = (reprfunc)pyg_enum_repr;
PyGEnum_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
diff --git a/gi/pygflags.c b/gi/pygflags.c
index f59612db..d9f38175 100644
--- a/gi/pygflags.c
+++ b/gi/pygflags.c
@@ -505,7 +505,7 @@ pygi_flags_register_types(PyObject *d)
PyGFlags_Type.tp_base = &PYGLIB_PyLong_Type;
PyGFlags_Type.tp_new = pyg_flags_new;
- PyGFlags_Type.tp_hash = PyLong_Type.tp_hash;
+ PyGFlags_Type.tp_hash = PYGLIB_PyLong_Type.tp_hash;
PyGFlags_Type.tp_repr = (reprfunc)pyg_flags_repr;
PyGFlags_Type.tp_as_number = &pyg_flags_as_number;
PyGFlags_Type.tp_str = (reprfunc)pyg_flags_repr;