mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
glib/gvarianttype: use G_DISABLE_CAST_CHECKS
Previously, G_VARIANT_TYPE() would "cast check" the type string unless G_DISABLE_CHECKS was set. We very much don't want people to ever set G_DISABLE_CHECKS but it is extremely normal to turn of cast-checks using G_DISASABLE_CAST_CHECKS in stable releases. This allows disabling the expensive type checking without catastrophically disabling g_return_if_fail() macros.
This commit is contained in:
parent
9eb9df2396
commit
786a5d364c
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user