* mu-threader, mu-util: cleanups

This commit is contained in:
Dirk-Jan C. Binnema 2011-08-30 22:02:49 +03:00
parent 6a13866235
commit 846d2da27f
3 changed files with 113 additions and 99 deletions

View File

@ -311,7 +311,7 @@ create_containers (MuMsgIter *iter)
unsigned docid;
/* 1.A */
msg = mu_msg_iter_get_msg (iter, NULL);
msg = mu_msg_iter_get_msg_floating (iter); /* don't unref */
docid = mu_msg_iter_get_docid (iter);
c = find_or_create (id_table, msg, docid);

View File

@ -482,3 +482,5 @@ mu_util_printerr_encoded (const char *frm, ...)
return rv;
}

View File

@ -255,6 +255,18 @@ typedef gpointer XapianDocument;
typedef gpointer XapianEnquire;
/* print a warning for a GError, and free it */
#define MU_HANDLE_G_ERROR(GE) \
do { \
if (!(GE)) \
g_warning ("%s:%u: an error occured in %s", \
__FILE__, __LINE__, __FUNCTION__); \
else { \
g_warning ("error %u: %s", (GE)->code, (GE)->message); \
g_error_free ((GE)); \
} \
} while (0)
/**