Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GLib
Commits
baf8ef7f
Commit
baf8ef7f
authored
Dec 07, 2020
by
Emmanuele Bassi
👣
Browse files
Deprecate boxed GTypes for GRegex types
parent
66611d77
Pipeline
#236878
passed with stages
in 25 minutes and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gobject/gboxed.c
View file @
baf8ef7f
...
...
@@ -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
)
...
...
gobject/glib-types.h
View file @
baf8ef7f
...
...
@@ -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:
...
...
gobject/tests/boxed.c
View file @
baf8ef7f
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment