From afbb6bd93b4d823dffc729b16e7020c798865b84 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:00:50 +0100 Subject: [PATCH] Add libcec patch for Python 3.13 --- patches/libcec-python13.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/libcec-python13.patch diff --git a/patches/libcec-python13.patch b/patches/libcec-python13.patch new file mode 100644 index 000000000..7e3f84021 --- /dev/null +++ b/patches/libcec-python13.patch @@ -0,0 +1,22 @@ +--- a/src/libcec/SwigHelper.h ++++ b/src/libcec/SwigHelper.h +@@ -119,7 +119,7 @@ namespace CEC + if (!!m_callbacks[callback]) + { + /** call the callback */ +- result = PyEval_CallObject(m_callbacks[callback], arglist); ++ result = PyObject_CallObject(m_callbacks[callback], arglist); + + /** unref the argument and result */ + if (!!arglist) +--- a/src/libcec/libcec.i ++++ b/src/libcec/libcec.i +@@ -141,7 +141,7 @@ namespace std { + if (!!lib) + { + lib->InitVideoStandalone(); +- PyEval_InitThreads(); ++ // PyEval_InitThreads(); + } + return lib; + }