diff --git a/src/mu-msg-data-cache.c b/src/mu-msg-data-cache.c index 3dd32b31..04b74039 100644 --- a/src/mu-msg-data-cache.c +++ b/src/mu-msg-data-cache.c @@ -19,7 +19,6 @@ #include "mu-msg-data-cache.h" - /* we cannot use GPtrArray, because we require the index to be stable... */ struct _MuMsgDataCache { MuMsgData **_data; diff --git a/src/mu-msg-data-cache.h b/src/mu-msg-data-cache.h index 6188af40..5ea98cf0 100644 --- a/src/mu-msg-data-cache.h +++ b/src/mu-msg-data-cache.h @@ -20,6 +20,10 @@ #ifndef __MU_MSG_DATA_CACHE_H__ #define __MU_MSG_DATA_CACHE_H__ +/* MuMsgDataCache stores MuMsgData objects which are basically + * serialized MuMsgIters; putting them in a datastructure allows us to + * work on them, e.g., for message threading */ + #include G_BEGIN_DECLS @@ -27,6 +31,13 @@ G_BEGIN_DECLS struct _MuMsgDataCache; typedef struct _MuMsgDataCache MuMsgDataCache; +/** + * create a new MuMsgDataCache instance + * + * @param max_size maximum size of the cache + * + * @return + */ MuMsgDataCache *mu_msg_data_cache_new (guint32 max_size) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; void mu_msg_data_cache_destroy (MuMsgDataCache *self); diff --git a/src/mu-store.cc b/src/mu-store.cc index c0f580fb..7ee2d6ce 100644 --- a/src/mu-store.cc +++ b/src/mu-store.cc @@ -500,7 +500,8 @@ get_message_uid (const char* path) buf[0]=pfx; } - strcpy (buf + 1, path); + std::strcpy (buf + 1, path); + return buf; } @@ -612,6 +613,7 @@ mu_store_get_timestamp (MuStore *store, const char* msgpath) rv = (time_t) g_ascii_strtoull (stampstr, NULL, 10); g_free (stampstr); + return rv; }