don't mangle plugin.get_version() to a tuple of int; it segfaults when the version...
authorThomas Vander Stichele <thomas@apestaart.org>
Sat, 3 Sep 2005 10:01:47 +0000 (10:01 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sat, 3 Sep 2005 10:01:47 +0000 (10:01 +0000)
Original commit message from CVS:
don't mangle plugin.get_version() to a tuple of int; it segfaults
when the version contains non-ints like '-'

ChangeLog
gst/gst.override

index f8fdfbd..29d204c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-09-03  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * gst/gst.override:
+         don't mangle plugin.get_version() to a tuple of int; it segfaults
+         when the version contains non-ints like '-'
+
+2005-09-03  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * testsuite/test_bin.py:
          fix state change test
 
index 5f57c51..e834e1d 100644 (file)
@@ -831,32 +831,7 @@ _wrap_gst_tag_setter_get_list(PyGObject *self)
     /* pyg_boxed_new handles NULL checking */
     return pyg_boxed_new(GST_TYPE_TAG_LIST, ret, TRUE, TRUE);
 }
-%%
-override gst_plugin_get_version noargs
-static PyObject *
-_wrap_gst_plugin_get_version(PyGObject *self)
-{
-        PyObject *tuple;
-        const gchar *version;
-        gchar **items, **p;
-        gint i = 0;
-        gint count = 0;
-        
-        version = gst_plugin_get_version(GST_PLUGIN(self->obj));
-        items = g_strsplit(version, ".", 4);
-        for (p = items; *p; ++p) ++count;
-
-       tuple = PyTuple_New(count);
-        for (p = items; *p; ++p) {
-                PyObject *item;
-                item = PyInt_FromString(*p, NULL, 10);
-                PyTuple_SetItem(tuple, i, item);
-                i++;
-        }
-
-        g_strfreev(items);
-        return tuple;
-}
+
 %%
 override gst_element_register kwargs