From 9cd2add463734880b99e097e8e1b20f0d49b2e2f Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 18 Oct 2005 10:02:41 +0000 Subject: [PATCH] gst/gstmessage.override (_wrap_gst_message_tp_repr): Add a repr for messages. Original commit message from CVS: 2005-10-18 Andy Wingo * gst/gstmessage.override (_wrap_gst_message_tp_repr): Add a repr for messages. --- ChangeLog | 5 +++++ common | 2 +- gst/gstmessage.override | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 83c3426d91..2da5470112 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-18 Andy Wingo + + * gst/gstmessage.override (_wrap_gst_message_tp_repr): Add a repr + for messages. + 2005-10-14 Edward Hervey * gst/gst.defs: diff --git a/common b/common index 3a9d355b65..1cb5d7b76a 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 3a9d355b657cf710011aa1eaadd64f6723527e14 +Subproject commit 1cb5d7b76a01c711674c752015089e70c394fa99 diff --git a/gst/gstmessage.override b/gst/gstmessage.override index ae9593d603..1fd7039de7 100644 --- a/gst/gstmessage.override +++ b/gst/gstmessage.override @@ -20,6 +20,26 @@ * Author: Johan Dahlin */ +%% +override-slot GstMessage.tp_repr +static PyObject * +_wrap_gst_message_tp_repr (PyGstMiniObject *self) +{ + GstMessage *msg; + gchar *repr; + PyObject *ret; + + g_assert (self); + msg = GST_MESSAGE (self->obj); + g_assert (msg); + + repr = g_strdup_printf ("", + gst_message_type_get_name (GST_MESSAGE_TYPE (msg)), msg); + ret = PyString_FromStringAndSize(repr, strlen (repr)); + g_free (repr); + return ret; +} + %% override gst_message_parse_state_changed noargs static PyObject *