mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-06 09:26:17 +01:00
Merge branch 'wip/chergert/gvariant-use-proper-macros-conditions' into 'main'
Fix incorrect use of assert/debug/check macros See merge request GNOME/glib!4292
This commit is contained in:
commit
fd9c00179f
@ -278,7 +278,7 @@ typedef struct _GVariantType GVariantType;
|
||||
*
|
||||
* Since 2.24
|
||||
**/
|
||||
#ifndef G_DISABLE_CHECKS
|
||||
#ifndef G_DISABLE_CAST_CHECKS
|
||||
# define G_VARIANT_TYPE(type_string) (g_variant_type_checked_ ((type_string)))
|
||||
#else
|
||||
# define G_VARIANT_TYPE(type_string) ((const GVariantType *) (type_string))
|
||||
|
@ -161,7 +161,7 @@ static void
|
||||
g_variant_type_info_check (const GVariantTypeInfo *info,
|
||||
char container_class)
|
||||
{
|
||||
#ifndef G_DISABLE_ASSERT
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
g_assert (!container_class || info->container_class == container_class);
|
||||
|
||||
/* 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 (g_variant_type_info_basic_chars[index][0] != ' ');
|
||||
}
|
||||
#endif /* !G_DISABLE_ASSERT */
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
}
|
||||
|
||||
/* < private >
|
||||
|
Loading…
Reference in New Issue
Block a user