Package: blist
Version: 1.3.6-7
Followup-For: Bug #999365
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Hello,

Attached is a patch that fixes this issue.

Of course, the package still FTBFS with gcc-11 (bug #983996).

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru blist-1.3.6/debian/patches/python-3.10.patch 
blist-1.3.6/debian/patches/python-3.10.patch
--- blist-1.3.6/debian/patches/python-3.10.patch        1969-12-31 
16:00:00.000000000 -0800
+++ blist-1.3.6/debian/patches/python-3.10.patch        2021-11-17 
15:45:37.000000000 -0800
@@ -0,0 +1,19 @@
+Description: Python 3.10 support
+ Py_REFCNT() is no longer an lvalue; use Py_SET_REFCNT() instead.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Update: 2021-11-17
+Bug-Debian: https://bugs.debian.org/999365
+
+Index: blist-1.3.6/blist/_blist.c
+===================================================================
+--- blist-1.3.6.orig/blist/_blist.c
++++ blist-1.3.6/blist/_blist.c
+@@ -6595,7 +6595,7 @@
+         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;
diff -Nru blist-1.3.6/debian/patches/series blist-1.3.6/debian/patches/series
--- blist-1.3.6/debian/patches/series   2020-10-15 10:05:56.000000000 -0700
+++ blist-1.3.6/debian/patches/series   2021-11-17 15:43:59.000000000 -0800
@@ -1,2 +1,3 @@
 0001-Catch-StopIteration-in-a-generator-and-return-instea.patch
 python3.9.patch
+python-3.10.patch

Reply via email to