summaryrefslogtreecommitdiff
path: root/gi/pygi-resulttuple.c
diff options
context:
space:
mode:
authorTomas Hrnciar <thrnciar@redhat.com>2020-11-06 12:25:38 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2020-11-11 10:09:10 +0100
commitba67301beea4b4a7a19485f68215b0f0d52888be (patch)
treee65d66e7d0129a9f683d80c8ecf1e74d6724b83e /gi/pygi-resulttuple.c
parentc28e4da87ab9411baa081c47e67574a1ea059493 (diff)
downloadpygobject-ba67301beea4b4a7a19485f68215b0f0d52888be.tar.gz
Don't assume Py_TYPE being a macro
Py_TYPE was changed to a function in Python 3.10. Suggested approach is to use Py_SET_TYPE macro instead, see: https://docs.python.org/3.10/whatsnew/3.10.html.
Diffstat (limited to 'gi/pygi-resulttuple.c')
-rw-r--r--gi/pygi-resulttuple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/pygi-resulttuple.c b/gi/pygi-resulttuple.c
index 6cb3cbae..416177bb 100644
--- a/gi/pygi-resulttuple.c
+++ b/gi/pygi-resulttuple.c
@@ -289,7 +289,7 @@ pygi_resulttuple_new(PyTypeObject *subclass, Py_ssize_t len) {
for (i=0; i < len; i++) {
PyTuple_SET_ITEM (self, i, NULL);
}
- Py_TYPE (self) = subclass;
+ Py_SET_TYPE (self, subclass);
Py_INCREF (subclass);
_Py_NewReference (self);
PyObject_GC_Track (self);