mc_search_struct: rename member: conditions -> prepared_conditions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2022-04-02 19:32:52 +03:00
parent 733f7ce54b
commit 975bf17d3b
3 changed files with 9 additions and 8 deletions

View File

@ -107,8 +107,8 @@ typedef struct mc_search_struct
/* private data */
/* prepared conditions */
GPtrArray *conditions;
/* prepared */
GPtrArray *prepared_conditions;
/* original search string */
gchar *original;

View File

@ -364,12 +364,13 @@ mc_search__regex_found_cond (mc_search_t * lc_mc_search, GString * search_str)
{
gsize loop1;
for (loop1 = 0; loop1 < lc_mc_search->conditions->len; loop1++)
for (loop1 = 0; loop1 < lc_mc_search->prepared_conditions->len; loop1++)
{
mc_search_cond_t *mc_search_cond;
mc_search__found_cond_t ret;
mc_search_cond = (mc_search_cond_t *) g_ptr_array_index (lc_mc_search->conditions, loop1);
mc_search_cond =
(mc_search_cond_t *) g_ptr_array_index (lc_mc_search->prepared_conditions, loop1);
if (!mc_search_cond->regex_handle)
continue;

View File

@ -188,8 +188,8 @@ mc_search_free (mc_search_t * lc_mc_search)
#endif
g_free (lc_mc_search->error_str);
if (lc_mc_search->conditions != NULL)
mc_search__conditions_free (lc_mc_search->conditions);
if (lc_mc_search->prepared_conditions != NULL)
mc_search__conditions_free (lc_mc_search->prepared_conditions);
#ifdef SEARCH_TYPE_GLIB
if (lc_mc_search->regex_match_info != NULL)
@ -256,7 +256,7 @@ mc_search_prepare (mc_search_t * lc_mc_search)
lc_mc_search->original_len,
str_detect_termencoding ()));
#endif
lc_mc_search->conditions = ret;
lc_mc_search->prepared_conditions = ret;
return (lc_mc_search->error == MC_SEARCH_E_OK);
}
@ -299,7 +299,7 @@ mc_search_run (mc_search_t * lc_mc_search, const void *user_data,
mc_search_set_error (lc_mc_search, MC_SEARCH_E_OK, NULL);
if ((lc_mc_search->conditions == NULL) && !mc_search_prepare (lc_mc_search))
if ((lc_mc_search->prepared_conditions == NULL) && !mc_search_prepare (lc_mc_search))
return FALSE;
switch (lc_mc_search->search_type)