alessandro gst-python: gst-python/ gst-python/gst/

[email protected] Mon, 5 Jan 2009 03:05:47 -0800 (PST)
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-python
Changes by:     alessandro
Date:           Mon Jan 05 2009  11:05:47 UTC

Log message:
	patch by: Vincent GENIEUX <mutex at runbox dot com>
	* gst/gststructure.override:
	Don't leak key names in _wrap_gst_structure_keys.

Modified files:
    .               : ChangeLog
    gst             : gststructure.override

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.707&r2=1.708
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gst/gststructure.override.diff?r1=1.12&r2=1.13

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-python/ChangeLog,v
retrieving revision 1.707
retrieving revision 1.708
diff -u -d -r1.707 -r1.708
--- ChangeLog	2 Jan 2009 21:46:29 -0000	1.707
+++ ChangeLog	5 Jan 2009 11:05:32 -0000	1.708
@@ -1,3 +1,10 @@
+2009-01-05  Alessandro Decina  <[email protected]>
+
+	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  <[email protected]>
 
 	* gst/gst-types.defs:
Index: gststructure.override
RCS file: /cvs/gstreamer/gst-python/gst/gststructure.override,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- gststructure.override	4 Apr 2007 12:22:03 -0000	1.12
+++ gststructure.override	5 Jan 2009 11:05:32 -0000	1.13
@@ -155,15 +155,13 @@
     int i, n;
     PyObject *ret;
-
-    ret = PyList_New(0);
     s = pyg_boxed_get(self, GstStructure);
     n = gst_structure_n_fields(s);
+    ret = PyList_New(n);
     for (i = 0; i < n; ++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;

------------------------------------------------------------------------------