summaryrefslogtreecommitdiff
path: root/gi/pygi-repository.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-repository.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-repository.c')
-rw-r--r--gi/pygi-repository.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/pygi-repository.c b/gi/pygi-repository.c
index a39e7b14..07fdc8f8 100644
--- a/gi/pygi-repository.c
+++ b/gi/pygi-repository.c
@@ -375,7 +375,7 @@ static PyMethodDef _PyGIRepository_methods[] = {
int
pygi_repository_register_types (PyObject *m)
{
- Py_TYPE(&PyGIRepository_Type) = &PyType_Type;
+ Py_SET_TYPE(&PyGIRepository_Type, &PyType_Type);
PyGIRepository_Type.tp_flags = Py_TPFLAGS_DEFAULT;
PyGIRepository_Type.tp_methods = _PyGIRepository_methods;