GVariantType: gut g_variant_type_check()
authorRyan Lortie <desrt@desrt.ca>
Mon, 27 Aug 2012 20:12:30 +0000 (16:12 -0400)
committerRyan Lortie <desrt@desrt.ca>
Mon, 27 Aug 2012 20:12:30 +0000 (16:12 -0400)
This function is causing an insane amount of wasted time on some
real-world profiles and it's pretty useless since we already have
GVariantType (as a type different from a string) for the purpose of
static type safety.

Disable it for now.  We can possibly turn this back on again if we solve
bug #544026.

https://bugzilla.gnome.org/show_bug.cgi?id=679835

glib/gvarianttype.c

index aeea1c1..658af77 100644 (file)
 static gboolean
 g_variant_type_check (const GVariantType *type)
 {
-  const gchar *type_string;
-
   if (type == NULL)
     return FALSE;
 
-  type_string = (const gchar *) type;
-#ifndef G_DISABLE_CHECKS
-  return g_variant_type_string_scan (type_string, NULL, NULL);
+#if 0
+  return g_variant_type_string_scan ((const gchar *) type, NULL, NULL);
 #else
   return TRUE;
 #endif