App: Fix ExtensionPython macro

This commit is contained in:
marioalexis
2025-05-25 18:58:48 -03:00
committed by Benjamin Nauck
parent 32ddaff649
commit 0cdf0af0c6
5 changed files with 24 additions and 15 deletions

View File

@@ -69,6 +69,7 @@ using namespace App;
Extension::~Extension()
{
if (!ExtensionPythonObject.is(Py::_None())) {
Base::PyGILStateLocker lock;
// Remark: The API of Py::Object has been changed to set whether the wrapper owns the passed
// Python object or not. In the constructor we forced the wrapper to own the object so we
// need not to dec'ref the Python object any more. But we must still invalidate the Python