mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-27 10:00:06 +01:00
glib/gvarianttypeinfo: use G_ENABLE_DEBUG not !G_DISABLE_ASSERT
Distributions are directed to disable G_ENABLE_DEBUG in stable builds. Many do not currently disable assertion checks with G_DISABLE_ASSERT. However this code is very much meant for debugging implementation details rather than runtime validation. Use G_ENABLE_DEBUG instead of !G_DISABLE_ASSERT to get the intended behavior.
This commit is contained in:
parent
84b6f747cb
commit
9eb9df2396
@ -161,7 +161,7 @@ static void
|
|||||||
g_variant_type_info_check (const GVariantTypeInfo *info,
|
g_variant_type_info_check (const GVariantTypeInfo *info,
|
||||||
char container_class)
|
char container_class)
|
||||||
{
|
{
|
||||||
#ifndef G_DISABLE_ASSERT
|
#ifdef G_ENABLE_DEBUG
|
||||||
g_assert (!container_class || info->container_class == container_class);
|
g_assert (!container_class || info->container_class == container_class);
|
||||||
|
|
||||||
/* alignment can only be one of these */
|
/* alignment can only be one of these */
|
||||||
@ -190,7 +190,7 @@ g_variant_type_info_check (const GVariantTypeInfo *info,
|
|||||||
g_assert (0 <= index && index < 24);
|
g_assert (0 <= index && index < 24);
|
||||||
g_assert (g_variant_type_info_basic_chars[index][0] != ' ');
|
g_assert (g_variant_type_info_basic_chars[index][0] != ' ');
|
||||||
}
|
}
|
||||||
#endif /* !G_DISABLE_ASSERT */
|
#endif /* G_ENABLE_DEBUG */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* < private >
|
/* < private >
|
||||||
|
Loading…
x
Reference in New Issue
Block a user