From ae23ffba6f77a252badd76ef91882e777d9ec04d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 15 Jul 2004 02:26:48 +0000 Subject: [PATCH] gst/gstelement.h: Don't GST_ERROR_OBJECT smpty strings - Solaris doesn't like NULL strings. Original commit message from CVS: * gst/gstelement.h: Don't GST_ERROR_OBJECT smpty strings - Solaris doesn't like NULL strings. * gst/gstelement.c (gst_element_class_init): GError's are boxed, not objects * gst/gstmarshal.list: update list for the fixed error signal --- ChangeLog | 10 ++++++++++ gst/gstelement.c | 2 +- gst/gstelement.h | 4 +++- gst/gstmarshal.list | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 748a77d845..41486a3527 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-07-15 Benjamin Otte + + * gst/gstelement.h: + Don't GST_ERROR_OBJECT smpty strings - Solaris doesn't like NULL + strings. + * gst/gstelement.c (gst_element_class_init): + GError's are boxed, not objects + * gst/gstmarshal.list: + update list for the fixed error signal + 2004-07-14 Andy Wingo * gst/gsttag.c: Add a tag merge func for pointers. The header was diff --git a/gst/gstelement.c b/gst/gstelement.c index d1772f8043..e0973f058b 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -139,7 +139,7 @@ gst_element_class_init (GstElementClass * klass) gst_element_signals[ERROR] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstElementClass, error), NULL, NULL, - gst_marshal_VOID__OBJECT_OBJECT_STRING, G_TYPE_NONE, 3, GST_TYPE_ELEMENT, + gst_marshal_VOID__OBJECT_BOXED_STRING, G_TYPE_NONE, 3, GST_TYPE_ELEMENT, GST_TYPE_G_ERROR, G_TYPE_STRING); gst_element_signals[EOS] = g_signal_new ("eos", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, diff --git a/gst/gstelement.h b/gst/gstelement.h index e196a0d575..4fee1b9616 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -143,7 +143,9 @@ typedef enum { #define GST_ELEMENT_ERROR(el, domain, code, message, debug) G_STMT_START { \ gchar *__msg = _gst_element_error_printf message; \ gchar *__dbg = _gst_element_error_printf debug; \ - GST_ERROR_OBJECT (el, "%s", __msg); \ + if (__msg) \ + GST_ERROR_OBJECT (el, "%s", __msg); \ + if (__dbg) \ GST_ERROR_OBJECT (el, "%s", __dbg); \ gst_element_error_full (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ diff --git a/gst/gstmarshal.list b/gst/gstmarshal.list index 7ec2067f80..16f5a054cc 100644 --- a/gst/gstmarshal.list +++ b/gst/gstmarshal.list @@ -9,6 +9,7 @@ VOID:OBJECT VOID:OBJECT,PARAM VOID:OBJECT,POINTER VOID:OBJECT,BOXED +VOID:OBJECT,BOXED,STRING VOID:OBJECT,OBJECT,STRING VOID:OBJECT,STRING VOID:INT,INT