Fix incorrect use of assert/debug/check macros
In our documentation it says that -DG_DISABLE_CAST_CHECKS
is how you disable cast checks. G_VARIANT_TYPE()
calling our private .._check_()
from the cast is definitely a cast check, yet it is guarded by G_DISABLE_CHECKS
. If you use G_DISABLE_CHECKS
you end up disabling all your function precondition checks, which is undesirable.
Additionally, GVaraintTypeInfo is doing "check the sanity inside the house" debugging checks gated by !G_DISABLE_ASSERT
. However our documentation (currently) reocommends that distributions disable G_ENABLE_DEBUG
in stable releases to compile this sort of sanity checks out.
(Arguably we should G_DISABLE_ASSERT
in stable builds, but I'm aware not everyone agrees with me on this).