From 906a9c83510562c713a6e234b943633e14fcc80f Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Sun, 19 Jul 2009 21:59:35 +0530 Subject: [PATCH] Add private pointer to instance structure to aid debugging. Thanks to matthew for suggesting. --- calendar/libedata-cal/e-cal-backend-file-store.c | 3 +-- calendar/libedata-cal/e-cal-backend-file-store.h | 3 +++ calendar/libedata-cal/e-cal-backend-store.c | 3 +-- calendar/libedata-cal/e-cal-backend-store.h | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/calendar/libedata-cal/e-cal-backend-file-store.c b/calendar/libedata-cal/e-cal-backend-file-store.c index 64d8280..718eecf 100644 --- a/calendar/libedata-cal/e-cal-backend-file-store.c +++ b/calendar/libedata-cal/e-cal-backend-file-store.c @@ -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; diff --git a/calendar/libedata-cal/e-cal-backend-file-store.h b/calendar/libedata-cal/e-cal-backend-file-store.h index 55aa6a0..f105b44 100644 --- a/calendar/libedata-cal/e-cal-backend-file-store.h +++ b/calendar/libedata-cal/e-cal-backend-file-store.h @@ -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 { diff --git a/calendar/libedata-cal/e-cal-backend-store.c b/calendar/libedata-cal/e-cal-backend-store.c index 25306d1..4877673 100644 --- a/calendar/libedata-cal/e-cal-backend-store.c +++ b/calendar/libedata-cal/e-cal-backend-store.c @@ -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; diff --git a/calendar/libedata-cal/e-cal-backend-store.h b/calendar/libedata-cal/e-cal-backend-store.h index de04dcf..8c05406 100644 --- a/calendar/libedata-cal/e-cal-backend-store.h +++ b/calendar/libedata-cal/e-cal-backend-store.h @@ -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 { -- 2.7.4