* 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

@ -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)
/**