From 08c7b1a5880c8580b3c1e02eb2310101caf2bf17 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 19 Aug 2005 14:46:05 +0000 Subject: [PATCH] gst/interfaces.override (_wrap_gst_tuner_list_channels) (_wrap_gst_tuner_list_norms, _wrap_gst_mixer_list_tracks) Original commit message from CVS: 2005-08-19 Andy Wingo * gst/interfaces.override (_wrap_gst_tuner_list_channels) (_wrap_gst_tuner_list_norms, _wrap_gst_mixer_list_tracks) (_wrap_gst_color_balance_list_channels): Catch programming errors without segfaults, as glib would do. --- ChangeLog | 7 +++++++ gst/interfaces.override | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7cd872470e..442e821568 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-19 Andy Wingo + + * gst/interfaces.override (_wrap_gst_tuner_list_channels) + (_wrap_gst_tuner_list_norms, _wrap_gst_mixer_list_tracks) + (_wrap_gst_color_balance_list_channels): Catch programming errors + without segfaults, as glib would do. + 2005-08-18 Andy Wingo * examples/debug-slider.py: New file. diff --git a/gst/interfaces.override b/gst/interfaces.override index 9be6874ec7..08724da960 100644 --- a/gst/interfaces.override +++ b/gst/interfaces.override @@ -58,6 +58,8 @@ _wrap_gst_tuner_list_channels(PyGObject *self) const GList *l, *list; PyObject *py_list; + g_return_val_if_fail (GST_IS_TUNER (self->obj), PyList_New(0)); + list = gst_tuner_list_channels(GST_TUNER(self->obj)); py_list = PyList_New(0); @@ -78,6 +80,8 @@ _wrap_gst_tuner_list_norms(PyGObject *self) const GList *l, *list; PyObject *py_list; + g_return_val_if_fail (GST_IS_TUNER (self->obj), PyList_New(0)); + list = gst_tuner_list_norms(GST_TUNER(self->obj)); py_list = PyList_New(0); @@ -98,6 +102,8 @@ _wrap_gst_mixer_list_tracks(PyGObject *self) const GList *l, *list; PyObject *py_list; + g_return_val_if_fail (GST_IS_MIXER (self->obj), PyList_New(0)); + list = gst_mixer_list_tracks(GST_MIXER(self->obj)); py_list = PyList_New(0); @@ -118,6 +124,8 @@ _wrap_gst_color_balance_list_channels(PyGObject *self) const GList *l, *list; PyObject *py_list; + g_return_val_if_fail (GST_IS_COLOR_BALANCE (self->obj), PyList_New(0)); + list = gst_color_balance_list_channels(GST_COLOR_BALANCE(self->obj)); py_list = PyList_New(0);