diff options
Diffstat (limited to 'glib')
-rw-r--r-- | glib/glib.symbols | 1 | ||||
-rw-r--r-- | glib/gvariant.c | 32 | ||||
-rw-r--r-- | glib/gvariant.h | 1 |
3 files changed, 2 insertions, 32 deletions
diff --git a/glib/glib.symbols b/glib/glib.symbols index ffc4d8e04..cb1318f28 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -1725,7 +1725,6 @@ g_variant_is_of_type g_variant_is_container g_variant_classify g_variant_compare -g_variant_default_value g_variant_new_boolean g_variant_new_byte diff --git a/glib/gvariant.c b/glib/gvariant.c index 4ffa7e5c9..3b5fd8c92 100644 --- a/glib/gvariant.c +++ b/glib/gvariant.c @@ -1377,7 +1377,7 @@ g_variant_dup_strv (GVariant *value, return strv; } -/* Type checking, querying, default value {{{1 */ +/* Type checking and querying {{{1 */ /** * g_variant_get_type: * @value: a #GVariant @@ -1455,6 +1455,7 @@ g_variant_is_container (GVariant *value) return g_variant_type_is_container (g_variant_get_type (value)); } + /** * g_variant_classify: * @value: a #GVariant @@ -1499,35 +1500,6 @@ g_variant_classify (GVariant *value) return *g_variant_get_type_string (value); } -/** - * g_variant_default_value: - * @type: a definite #GVariantType - * @returns: a reference to a #GVariant of the requested type - * - * Returns the "default value" for @type. The default boolean instance - * is false, the default value for any numeric type is (positive) zero, - * the default array is empty and the default maybe instance is Nothing. - * The default value for a tuple type is the tuple containing the - * default value for each child. This is roughly equivalent to the - * values produced by the serialiser when it detects invalid data. - * - * Since: 2.26 - **/ -GVariant * -g_variant_default_value (const GVariantType *type) -{ - GVariant *broken, *fixed; - - g_return_val_if_fail (g_variant_type_is_definite (type), NULL); - - /* let the serialiser figure it out */ - broken = g_variant_new_from_data (type, NULL, 0, FALSE, NULL, NULL); - fixed = g_variant_get_normal_form (broken); - g_variant_unref (broken); - - return fixed; -} - /* Pretty printer {{{1 */ /** * g_variant_print_string: diff --git a/glib/gvariant.h b/glib/gvariant.h index 87bf588d3..e4a80c02e 100644 --- a/glib/gvariant.h +++ b/glib/gvariant.h @@ -62,7 +62,6 @@ gboolean g_variant_is_of_type (GVarian const GVariantType *type); gboolean g_variant_is_container (GVariant *value); GVariantClass g_variant_classify (GVariant *value); -GVariant * g_variant_default_value (const GVariantType *type); GVariant * g_variant_new_boolean (gboolean boolean); GVariant * g_variant_new_byte (guchar byte); GVariant * g_variant_new_int16 (gint16 int16); |