aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-09 10:11:16 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-09 10:11:16 +0800
commit4d84b990b064bc058f40d80ea2970c3d57ed51f9 (patch)
tree6a7e1510154d3a6465d5a69c2a3bede9f4c8a84c
parenta6a600a40a235d79207014149a28276c616041d4 (diff)
downloadgsoc2013-evolution-4d84b990b064bc058f40d80ea2970c3d57ed51f9.tar.gz
gsoc2013-evolution-4d84b990b064bc058f40d80ea2970c3d57ed51f9.tar.zst
gsoc2013-evolution-4d84b990b064bc058f40d80ea2970c3d57ed51f9.zip
move assertions here. (set_mime_type_field): change order slightly to
2004-01-09 Not Zed <NotZed@Ximian.com> * camel-data-wrapper.c (camel_data_wrapper_set_mime_type_field): move assertions here. (set_mime_type_field): change order slightly to properly handle setting the same object. removed assertions from internal method. svn path=/trunk/; revision=24123
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-data-wrapper.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e2ba044b98..bf5999c080 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-09 Not Zed <NotZed@Ximian.com>
+
+ * camel-data-wrapper.c (camel_data_wrapper_set_mime_type_field):
+ move assertions here.
+ (set_mime_type_field): change order slightly to properly handle
+ setting the same object. removed assertions from internal method.
+
2004-01-08 Sivaiah Nallagatla <snallagatla@novell.com>
* providers/Makefile.am : add groupwise to SUBDIRS
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index e30cd10927..51be0cb1b4 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -350,20 +350,20 @@ static void
set_mime_type_field (CamelDataWrapper *data_wrapper,
CamelContentType *mime_type)
{
- g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
- g_return_if_fail (mime_type != NULL);
-
+ if (mime_type)
+ camel_content_type_ref (mime_type);
if (data_wrapper->mime_type)
camel_content_type_unref (data_wrapper->mime_type);
data_wrapper->mime_type = mime_type;
- if (mime_type)
- camel_content_type_ref (data_wrapper->mime_type);
}
void
camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper,
CamelContentType *mime_type)
{
+ g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
+ g_return_if_fail (mime_type != NULL);
+
CDW_CLASS (data_wrapper)->set_mime_type_field (data_wrapper, mime_type);
}