macros: add side-effecting variants of asserts
authorRyan Lortie <desrt@desrt.ca>
Mon, 1 Dec 2014 21:33:32 +0000 (16:33 -0500)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 10 Jul 2015 09:47:42 +0000 (11:47 +0200)
commit8638fe6875159c93d44a9c985aafdb39e4ac60f8
treec2e5fbfe4f37b7a413f49f196aa10b4b92c1c474
parent5dadd9b25e86e9c9749a019301b5bd09b0dfea76
macros: add side-effecting variants of asserts

Add g_assert_se(), g_return_if_fail_se() and g_return_val_if_fail_se()
as variants of the existing macros that are guaranteed to evaluate side
effects in their expression argument.  Inspired by similar macros in
systemd.

These are just macros, so they come at no extra cost.

https://bugzilla.gnome.org/show_bug.cgi?id=741026
docs/reference/glib/glib-sections.txt
glib/gmessages.h
glib/gtestutils.c
glib/gtestutils.h