SHA256
1
0
forked from pool/python-pivy
Files
python-pivy/fix_python_312_PyUnicode_usage.patch
Atri Bhattacharya 4cc1e835b3 Accepting request 1166881 from home:StefanBruens:branches:science
- Fix build with Python 3.12, BuildRequire python-setuptools, add
  * fix_python_312_replace_PyEval_CallObject.patch
  * fix_python_312_PyUnicode_usage.patch

OBS-URL: https://build.opensuse.org/request/show/1166881
OBS-URL: https://build.opensuse.org/package/show/science/python-pivy?expand=0&rev=29
2024-04-13 07:50:45 +00:00

24 lines
675 B
Diff

From d3faf04b8770c60ca9b2186059ee82201e3620ad Mon Sep 17 00:00:00 2001
From: lorenz <looooo@users.noreply.github.com>
Date: Thu, 13 Jul 2023 23:59:17 +0200
Subject: [PATCH] python 3.12 support
PyUnicode_GET_SIZE -> PyUnicode_GET_LENGTH
---
Inventor/SoInput.i | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Inventor/SoInput.i b/Inventor/SoInput.i
index 0925ab50..f0be6383 100644
--- a/Inventor/SoInput.i
+++ b/Inventor/SoInput.i
@@ -10,7 +10,7 @@
if (PyUnicode_Check($input))
{
$1 = (void *) PyUnicode_AsUTF8($input);
- $2 = PyUnicode_GET_SIZE($input);
+ $2 = PyUnicode_GET_LENGTH($input);
}
else if (PyBytes_Check($input))
{