mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-06 02:58:55 +01:00
Merge branch 'pattern_uint' into 'main'
gpattern: Support patterns/strings longer than G_MAXUINT See merge request GNOME/glib!4840
This commit is contained in:
@@ -292,7 +292,7 @@ g_pattern_spec_new (const gchar *pattern)
|
|||||||
size_t hw_pos = 0, tw_pos = 0, hj_pos = 0, tj_pos = 0;
|
size_t hw_pos = 0, tw_pos = 0, hj_pos = 0, tj_pos = 0;
|
||||||
gboolean hw_pos_set = FALSE, hj_pos_set = FALSE;
|
gboolean hw_pos_set = FALSE, hj_pos_set = FALSE;
|
||||||
gboolean follows_wildcard = FALSE;
|
gboolean follows_wildcard = FALSE;
|
||||||
guint pending_jokers = 0;
|
size_t pending_jokers = 0;
|
||||||
const gchar *s;
|
const gchar *s;
|
||||||
gchar *d;
|
gchar *d;
|
||||||
size_t i;
|
size_t i;
|
||||||
@@ -361,7 +361,7 @@ g_pattern_spec_new (const gchar *pattern)
|
|||||||
seen_wildcard = hw_pos_set;
|
seen_wildcard = hw_pos_set;
|
||||||
more_wildcards = seen_wildcard && hw_pos != tw_pos;
|
more_wildcards = seen_wildcard && hw_pos != tw_pos;
|
||||||
if (seen_wildcard)
|
if (seen_wildcard)
|
||||||
pspec->max_length = G_MAXUINT;
|
pspec->max_length = G_MAXSIZE;
|
||||||
|
|
||||||
/* special case sole head/tail wildcard or exact matches */
|
/* special case sole head/tail wildcard or exact matches */
|
||||||
if (!seen_joker && !more_wildcards)
|
if (!seen_joker && !more_wildcards)
|
||||||
|
|||||||
Reference in New Issue
Block a user