From 61038c89f1e67a9a7c3d3de08bc097a50916dae9 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 3 Sep 2005 10:01:47 +0000 Subject: [PATCH] don't mangle plugin.get_version() to a tuple of int; it segfaults when the version contains non-ints like '-' 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 | 6 ++++++ gst/gst.override | 25 ------------------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8fdfbd67b..29d204ce99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-03 Thomas Vander Stichele + + * 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 * testsuite/test_bin.py: diff --git a/gst/gst.override b/gst/gst.override index 5f57c5160a..e834e1d0e1 100644 --- a/gst/gst.override +++ b/gst/gst.override @@ -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