+Thu Sep 9 10:37:41 2004 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmessages.h (g_return_[val_]if_fail): Use
+ a helper function to reduce code size; omit FILE/LINE
+ when we have __PRETTY_FUNCTION__.
+
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_home_dir): Remove a misleading comment.
+Thu Sep 9 10:37:41 2004 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmessages.h (g_return_[val_]if_fail): Use
+ a helper function to reduce code size; omit FILE/LINE
+ when we have __PRETTY_FUNCTION__.
+
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_home_dir): Remove a misleading comment.
+Thu Sep 9 10:37:41 2004 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmessages.h (g_return_[val_]if_fail): Use
+ a helper function to reduce code size; omit FILE/LINE
+ when we have __PRETTY_FUNCTION__.
+
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_home_dir): Remove a misleading comment.
+Thu Sep 9 10:37:41 2004 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmessages.h (g_return_[val_]if_fail): Use
+ a helper function to reduce code size; omit FILE/LINE
+ when we have __PRETTY_FUNCTION__.
+
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_home_dir): Remove a misleading comment.
+Thu Sep 9 10:37:41 2004 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gmessages.h (g_return_[val_]if_fail): Use
+ a helper function to reduce code size; omit FILE/LINE
+ when we have __PRETTY_FUNCTION__.
+
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_home_dir): Remove a misleading comment.
#ifdef __GNUC__
+/* Internal function, used to implement following macros */
+void g_return_if_fail_warning (const char *log_domain,
+ const char *pretty_function,
+ const char *expression);
+
#define g_return_if_fail(expr) G_STMT_START{ \
if G_LIKELY(expr) { } else \
{ \
- g_log (G_LOG_DOMAIN, \
- G_LOG_LEVEL_CRITICAL, \
- "file %s: line %d (%s): assertion `%s' failed", \
- __FILE__, \
- __LINE__, \
- __PRETTY_FUNCTION__, \
- #expr); \
+ g_return_if_fail_warning (G_LOG_DOMAIN, \
+ __PRETTY_FUNCTION__, \
+ #expr); \
return; \
}; }G_STMT_END
#define g_return_val_if_fail(expr,val) G_STMT_START{ \
if G_LIKELY(expr) { } else \
{ \
- g_log (G_LOG_DOMAIN, \
- G_LOG_LEVEL_CRITICAL, \
- "file %s: line %d (%s): assertion `%s' failed", \
- __FILE__, \
- __LINE__, \
- __PRETTY_FUNCTION__, \
- #expr); \
+ g_return_if_fail_warning (G_LOG_DOMAIN, \
+ __PRETTY_FUNCTION__, \
+ #expr); \
return (val); \
}; }G_STMT_END