mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/gststructure.override: Don't leak key names in _wrap_gst_structure_keys.
Original commit message from CVS: patch by: Vincent GENIEUX <mutex at runbox dot com> * gst/gststructure.override: Don't leak key names in _wrap_gst_structure_keys.
This commit is contained in:
parent
0cfca146c5
commit
405b07512a
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2009-01-05 Alessandro Decina <alessandro.decina@collabora.co.uk>
|
||||||
|
|
||||||
|
patch by: Vincent GENIEUX <mutex at runbox dot com>
|
||||||
|
|
||||||
|
* gst/gststructure.override:
|
||||||
|
Don't leak key names in _wrap_gst_structure_keys.
|
||||||
|
|
||||||
2009-01-02 Edward Hervey <edward.hervey@collabora.co.uk>
|
2009-01-02 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
|
||||||
* gst/gst-types.defs:
|
* gst/gst-types.defs:
|
||||||
|
|
|
@ -155,15 +155,13 @@ _wrap_gst_structure_keys (PyObject *self)
|
||||||
int i, n;
|
int i, n;
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
|
|
||||||
ret = PyList_New(0);
|
|
||||||
|
|
||||||
s = pyg_boxed_get(self, GstStructure);
|
s = pyg_boxed_get(self, GstStructure);
|
||||||
n = gst_structure_n_fields(s);
|
n = gst_structure_n_fields(s);
|
||||||
|
ret = PyList_New(n);
|
||||||
|
|
||||||
for (i = 0; i < n; ++i) {
|
for (i = 0; i < n; ++i) {
|
||||||
const gchar *name = gst_structure_nth_field_name (s, i);
|
const gchar *name = gst_structure_nth_field_name (s, i);
|
||||||
PyList_Append(ret, PyString_FromString(name));
|
PyList_SetItem(ret, i, PyString_FromString(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue