mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 11:14:05 +02:00
gtestutils: Clarify that g_assert() should not have side effects
g_assert() gets completely compiled out if G_DISABLE_ASSERT is defined, so applications should not depend on side effects of the expression in an assertion.
This commit is contained in:
@@ -380,7 +380,8 @@
|
|||||||
* an error message is logged and the application is terminated.
|
* an error message is logged and the application is terminated.
|
||||||
*
|
*
|
||||||
* The macro can be turned off in final releases of code by defining
|
* The macro can be turned off in final releases of code by defining
|
||||||
* `G_DISABLE_ASSERT` when compiling the application.
|
* `G_DISABLE_ASSERT` when compiling the application, so code must
|
||||||
|
* not depend on any side effects from @expr.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user