Add private pointer to instance structure to aid debugging.
authorChenthill Palanisamy <pchenthill@novell.com>
Sun, 19 Jul 2009 16:29:35 +0000 (21:59 +0530)
committerChenthill Palanisamy <pchenthill@novell.com>
Sun, 19 Jul 2009 16:29:35 +0000 (21:59 +0530)
Thanks to matthew for suggesting.

calendar/libedata-cal/e-cal-backend-file-store.c
calendar/libedata-cal/e-cal-backend-file-store.h
calendar/libedata-cal/e-cal-backend-store.c
calendar/libedata-cal/e-cal-backend-store.h

index 64d8280..718eecf 100644 (file)
@@ -33,8 +33,6 @@ G_DEFINE_TYPE (ECalBackendFileStore, e_cal_backend_file_store, E_TYPE_CAL_BACKEN
 #define GET_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_CAL_BACKEND_FILE_STORE, ECalBackendFileStorePrivate))
 
-typedef struct _ECalBackendFileStorePrivate ECalBackendFileStorePrivate;
-
 typedef struct {
        ECalComponent *comp;
        GHashTable *recurrences;
@@ -729,6 +727,7 @@ e_cal_backend_file_store_init (ECalBackendFileStore *self)
 
        priv = GET_PRIVATE(self);
 
+       self->priv = priv;
        priv->timezones = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
        priv->comp_uid_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) destroy_full_object);
        priv->keys_cache = NULL;
index 55aa6a0..f105b44 100644 (file)
@@ -44,8 +44,11 @@ G_BEGIN_DECLS
 #define E_CAL_BACKEND_FILE_STORE_GET_CLASS(obj) \
   (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CAL_BACKEND_FILE_STORE, ECalBackendFileStoreClass))
 
+typedef struct _ECalBackendFileStorePrivate ECalBackendFileStorePrivate;
+
 typedef struct {
        ECalBackendStore parent;
+       ECalBackendFileStorePrivate *priv;
 } ECalBackendFileStore;
 
 typedef struct {
index 25306d1..4877673 100644 (file)
@@ -26,8 +26,6 @@ G_DEFINE_TYPE (ECalBackendStore, e_cal_backend_store, G_TYPE_OBJECT)
 #define GET_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_CAL_BACKEND_STORE, ECalBackendStorePrivate))
 
-typedef struct _ECalBackendStorePrivate ECalBackendStorePrivate;
-
 struct _ECalBackendStorePrivate {
        ECalSourceType source_type;
        gchar *uri;
@@ -205,6 +203,7 @@ e_cal_backend_store_init (ECalBackendStore *store)
 
        priv = GET_PRIVATE(store);
 
+       store->priv = priv;
        priv->uri = NULL;
        priv->path = NULL;
        priv->source_type = E_CAL_SOURCE_TYPE_EVENT;
index de04dcf..8c05406 100644 (file)
@@ -45,8 +45,11 @@ G_BEGIN_DECLS
 #define E_CAL_BACKEND_STORE_GET_CLASS(obj) \
   (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CAL_BACKEND_STORE, ECalBackendStoreClass))
 
+typedef struct _ECalBackendStorePrivate ECalBackendStorePrivate;
+
 typedef struct {
        GObject parent;
+       ECalBackendStorePrivate *priv;
 } ECalBackendStore;
 
 typedef struct {