aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-object.h
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-object.h')
-rw-r--r--camel/camel-object.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/camel/camel-object.h b/camel/camel-object.h
index ec0416d4f4..613f05dcc8 100644
--- a/camel/camel-object.h
+++ b/camel/camel-object.h
@@ -116,8 +116,15 @@ const gchar *camel_type_to_name (CamelType type);
CamelType camel_object_get_type (void);
CamelObject *camel_object_new (CamelType type);
-void camel_object_ref (CamelObject * obj);
-void camel_object_unref (CamelObject * obj);
+
+void camel_object_ref (CamelObject *obj);
+void camel_object_unref (CamelObject *obj);
+
+#ifdef CAMEL_DEBUG
+#define camel_object_ref(o) (printf("%s (%s:%d):ref (%p)\n", __FUNCTION__, __FILE__, __LINE__, o), camel_object_ref(o))
+#define camel_object_unref(o) (printf("%s (%s:%d):unref (%p)\n", __FUNCTION__, __FILE__, __LINE__, o), camel_object_unref (o))
+#endif
+
CamelObject *camel_object_check_cast (CamelObject * obj,
CamelType ctype);
CamelObjectClass *camel_object_class_check_cast (CamelObjectClass *