]> git.ipfire.org Git - pakfire.git/commit
python: pakfire: Keep a reference to the Python context
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Mar 2025 10:41:30 +0000 (10:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Mar 2025 10:41:30 +0000 (10:41 +0000)
commit7c7e7618dcc0dc7a2766c5ba20f526e3249ea357
tree4fc3eab483ed831e78fd7b8afd14654be8ef54f5
parentb5bff46cc3c63da73a052c415d84e55fd53a3ec7
python: pakfire: Keep a reference to the Python context

Since we are registering all sorts of callbacks to here, we cannot
deallocate the Ctx object, or we won't be able to use them any more.

This is being fixed by holding a reference to the Python object instead
of the context itself. That will at least help us with lots of these
problems.

There is still, however, the problem that both the Python Ctx and
Pakfire object can be dereferenced when the backend objects will remain
existing.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/pakfire.c
src/python/pakfire.h