summaryrefslogtreecommitdiff
path: root/dev-python/pycups/files/pycups-2.0.1-py3.10.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pycups/files/pycups-2.0.1-py3.10.patch')
-rw-r--r--dev-python/pycups/files/pycups-2.0.1-py3.10.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/dev-python/pycups/files/pycups-2.0.1-py3.10.patch b/dev-python/pycups/files/pycups-2.0.1-py3.10.patch
new file mode 100644
index 000000000000..557b485fbafe
--- /dev/null
+++ b/dev-python/pycups/files/pycups-2.0.1-py3.10.patch
@@ -0,0 +1,24 @@
+From 8cbf6d40a0132764ad51e7416aa7034966875091 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Mon, 28 Jun 2021 13:17:45 +0200
+Subject: [PATCH] cupsipp.h: define PY_SSIZE_T_CLEAN
+
+Fixes traceback during IPPRequest.writeIO with Python 3.10
+---
+ NEWS | 2 ++
+ cupsipp.h | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/cupsipp.h b/cupsipp.h
+index 2a15ce6..b890198 100644
+--- a/cupsipp.h
++++ b/cupsipp.h
+@@ -21,6 +21,8 @@
+ #ifndef HAVE_CUPSIPP_H
+ #define HAVE_CUPSIPP_H
+
++#define PY_SSIZE_T_CLEAN
++
+ #include <Python.h>
+ #include <cups/ipp.h>
+