diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-06-07 21:51:59 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-06-07 21:51:59 +0300 |
commit | 48048a39309e180fa439b1b158a87c2081bafbaa (patch) | |
tree | d36f229882a2f01151dee05a0eacfcf996815250 /python/rpmmi-py.h | |
parent | 578e90f2f83ba1872890182902f0fd0de28db402 (diff) | |
download | rpm-48048a39309e180fa439b1b158a87c2081bafbaa.tar.gz rpm-48048a39309e180fa439b1b158a87c2081bafbaa.tar.bz2 rpm-48048a39309e180fa439b1b158a87c2081bafbaa.zip |
Ts/db reference counting for match-iterators in python (rhbz#241751)
Adds additional refcounting to the python level ts/db object to avoid
anonymous ts/db from getting deleted while still iterating over it.
Diffstat (limited to 'python/rpmmi-py.h')
-rw-r--r-- | python/rpmmi-py.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/rpmmi-py.h b/python/rpmmi-py.h index c45b2fd03..4c4f7173a 100644 --- a/python/rpmmi-py.h +++ b/python/rpmmi-py.h @@ -14,6 +14,7 @@ typedef struct rpmmiObject_s rpmmiObject; struct rpmmiObject_s { PyObject_HEAD PyObject *md_dict; /*!< to look like PyModuleObject */ + PyObject *ref; /* for db/ts refcounting */ rpmdbMatchIterator mi; } ; @@ -21,7 +22,7 @@ struct rpmmiObject_s { extern PyTypeObject rpmmi_Type; /*@null@*/ -rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi) +rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) /*@*/; #endif |