From 4b88010f208080173d0976d271d4c3100bfbef17 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Thu, 18 Nov 2021 13:42:17 -0400 Subject: [PATCH] Python 3.10 support: use Py_SET_REFCNT() Py_REFCNT() is no longer an lvalue; use Py_SET_REFCNT() instead. --- blist/_blist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blist/_blist.c b/blist/_blist.c index f7fcb60..cacd6f2 100644 --- a/blist/_blist.c +++ b/blist/_blist.c @@ -6589,7 +6589,7 @@ py_blist_sort(PyBListRoot *self, PyObject *args, PyObject *kwds) memcpy(&saved.BLIST_FIRST_FIELD, &self->BLIST_FIRST_FIELD, sizeof(*self) - offsetof(PyBListRoot, BLIST_FIRST_FIELD)); Py_TYPE(&saved) = &PyRootBList_Type; - Py_REFCNT(&saved) = 1; + Py_SET_REFCNT(&saved, 1); if (extra_list != NULL) { self->children = extra_list;