Commit baf8ef7f authored by Emmanuele Bassi's avatar Emmanuele Bassi 👣
Browse files

Deprecate boxed GTypes for GRegex types

parent 66611d77
Pipeline #236878 passed with stages
in 25 minutes and 8 seconds
......@@ -147,8 +147,11 @@ G_DEFINE_BOXED_TYPE (GByteArray, g_byte_array, g_byte_array_ref, g_byte_array_un
G_DEFINE_BOXED_TYPE (GBytes, g_bytes, g_bytes_ref, g_bytes_unref)
G_DEFINE_BOXED_TYPE (GTree, g_tree, g_tree_ref, g_tree_unref)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* GRegex API has been deprecated in 2.68 */
G_DEFINE_BOXED_TYPE (GRegex, g_regex, g_regex_ref, g_regex_unref)
G_DEFINE_BOXED_TYPE (GMatchInfo, g_match_info, g_match_info_ref, g_match_info_unref)
G_GNUC_END_IGNORE_DEPRECATIONS
#define g_variant_type_get_type g_variant_type_get_gtype
G_DEFINE_BOXED_TYPE (GVariantType, g_variant_type, g_variant_type_copy, g_variant_type_free)
......
......@@ -91,8 +91,10 @@ typedef gsize GType;
* The #GType for a boxed type holding a #GRegex reference.
*
* Since: 2.14
*
* Deprecated: 2.68: Use a custom boxed type around PCRE 2 types instead
*/
#define G_TYPE_REGEX (g_regex_get_type ())
#define G_TYPE_REGEX (g_regex_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_68
/**
* G_TYPE_MATCH_INFO:
......@@ -100,8 +102,10 @@ typedef gsize GType;
* The #GType for a boxed type holding a #GMatchInfo reference.
*
* Since: 2.30
*
* Deprecated: 2.68: Use a custom boxed type around PCRE 2 types instead
*/
#define G_TYPE_MATCH_INFO (g_match_info_get_type ())
#define G_TYPE_MATCH_INFO (g_match_info_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_68
/**
* G_TYPE_ARRAY:
......
......@@ -271,6 +271,7 @@ test_boxed_ptrarray (void)
g_value_unset (&value);
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void
test_boxed_regex (void)
{
......@@ -293,7 +294,9 @@ test_boxed_regex (void)
g_value_unset (&value);
}
G_GNUC_END_IGNORE_DEPRECATIONS
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static void
test_boxed_matchinfo (void)
{
......@@ -320,6 +323,7 @@ test_boxed_matchinfo (void)
g_value_unset (&value);
g_regex_unref (r);
}
G_GNUC_END_IGNORE_DEPRECATIONS
static void
test_boxed_varianttype (void)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment