mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
gstrfuncs: Add missing preconditions to g_str_match_string()
https://bugzilla.gnome.org/show_bug.cgi?id=113075
This commit is contained in:
parent
81e0a2f362
commit
11297fd183
@ -2944,6 +2944,8 @@ g_str_tokenize_and_fold (const gchar *string,
|
||||
{
|
||||
gchar **result;
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
if (ascii_alternates && g_str_is_ascii (string))
|
||||
{
|
||||
*ascii_alternates = g_new0 (gchar *, 0 + 1);
|
||||
@ -3037,6 +3039,9 @@ g_str_match_string (const gchar *search_term,
|
||||
gboolean matched;
|
||||
gint i, j;
|
||||
|
||||
g_return_val_if_fail (search_term != NULL, FALSE);
|
||||
g_return_val_if_fail (potential_hit != NULL, FALSE);
|
||||
|
||||
term_tokens = g_str_tokenize_and_fold (search_term, NULL, NULL);
|
||||
hit_tokens = g_str_tokenize_and_fold (potential_hit, NULL, accept_alternates ? &alternates : NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user