lorcon: python 3.13 patch for testing

This commit is contained in:
Anton Bolshakov 2025-04-22 12:05:10 +08:00
parent ab9f286964
commit 3e19562b21
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
2 changed files with 23 additions and 8 deletions

View file

@ -0,0 +1,20 @@
--- a/pylorcon2/PyLorcon2.c.orig 2022-02-16 23:20:32.000000000 +0800
+++ b/pylorcon2/PyLorcon2.c 2025-04-22 12:02:33.146371998 +0800
@@ -1325,7 +1325,7 @@
/* Call the error cb function */
cb_arg = Py_BuildValue("(O)", lorcon_obj);
- pyresult = PyEval_CallObject(multi->error_cb_func, cb_arg);
+ pyresult = PyObject_Call(multi->error_cb_func, cb_arg, NULL);
Py_DECREF(cb_arg);
if (pyresult == NULL) {
@@ -1425,7 +1425,7 @@
Py_DECREF(packet_tuple_arg);
cb_arg = Py_BuildValue("(O)", pypacket);
- pyresult = PyEval_CallObject(multi->cb_func, cb_arg);
+ pyresult = PyObject_Call(multi->cb_func, cb_arg, NULL);
Py_DECREF(cb_arg);
if (pyresult == NULL) {

View file

@ -40,16 +40,11 @@ BDEPEND="
virtual/pkgconfig
python? ( ${DISTUTILS_DEPS} )"
PATCHES=( "${FILESDIR}"/${P}-C99-decls.patch )
PATCHES=( "${FILESDIR}"/${P}-C99-decls.patch
"${FILESDIR}"/python_3.13.patch
)
src_prepare() {
if use python && use python_targets_python3_13; then
eerror "Python 3.13 is not supported by this version"
eerror "Please disable python use flag"
die
fi
default
use python && distutils-r1_src_prepare
}