thunar issueshttps://gitlab.xfce.org/xfce/thunar/-/issues2022-06-21T09:21:47Zhttps://gitlab.xfce.org/xfce/thunar/-/issues/810Prevent confusion around _thunar_return_val_if_fail and _thunar_return_if_fail2022-06-21T09:21:47ZAlexander SchwinnPrevent confusion around _thunar_return_val_if_fail and _thunar_return_if_failEvery now and than it happens that bugs / crashes in distro-packed thunar cannot be reproduced easily, because they only occur when `_thunar_return_val_if_fail` and `_thunar_return_if_fail` are disabled. (When building from source, these...Every now and than it happens that bugs / crashes in distro-packed thunar cannot be reproduced easily, because they only occur when `_thunar_return_val_if_fail` and `_thunar_return_if_fail` are disabled. (When building from source, these calls are enabled by default)
To disable them, it is required to build with `--disable-debug`. Here the related code: https://gitlab.xfce.org/xfce/thunar/-/blob/a90e946ae945e1d3ae83e9e1b4f37e667d1f24b1/thunar/thunar-private.h#L29
Having these guards only active when building from source in most situations is not desired, leading to additional `if`-checks or `g_return_val_if_fail` / `g_return_if_fail` calls.
Till now I did not face any performance penalties introduced by the guards, so I would suggest to just have them always active.
Another option would be to rename them to `_thunar_debug_return_val_if_fail` and `_thunar_debug_return_if_fail` in order to at least make it more clear that they are debug-only. Though I would prefer to have option 1: always-enabled.
@andreldm , @Tamaranch , @SKefalidis , @MShrimp4 : What do you think ? Would be great to hear your opinion on this suggestion !
Related: #808