gst/gstmessage.override (_wrap_gst_message_tp_repr): Add a repr for messages.
authorAndy Wingo <wingo@pobox.com>
Tue, 18 Oct 2005 10:02:41 +0000 (10:02 +0000)
committerAndy Wingo <wingo@pobox.com>
Tue, 18 Oct 2005 10:02:41 +0000 (10:02 +0000)
Original commit message from CVS:
2005-10-18  Andy Wingo  <wingo@pobox.com>

* gst/gstmessage.override (_wrap_gst_message_tp_repr): Add a repr
for messages.

ChangeLog
common
gst/gstmessage.override

index 83c3426..2da5470 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-18  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gstmessage.override (_wrap_gst_message_tp_repr): Add a repr
+       for messages.
+
 2005-10-14  Edward Hervey  <edward@fluendo.com>
 
        * gst/gst.defs:
diff --git a/common b/common
index 3a9d355..1cb5d7b 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 3a9d355b657cf710011aa1eaadd64f6723527e14
+Subproject commit 1cb5d7b76a01c711674c752015089e70c394fa99
index ae9593d..1fd7039 100644 (file)
  */
 
 %%
+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 %s at %p>",
+        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 *
 _wrap_gst_message_parse_state_changed (PyGstMiniObject *self)