@@ -3732,7 +3732,7 @@ f_environ(typval_T *argvars UNUSED, typval_T *rettv)
37323732 extern char * * environ ;
37333733# endif
37343734
3735- if (rettv_dict_alloc (rettv ) != OK )
3735+ if (rettv_dict_alloc (rettv ) == FAIL )
37363736 return ;
37373737
37383738# ifdef MSWIN
@@ -4159,7 +4159,7 @@ f_expand(typval_T *argvars, typval_T *rettv)
41594159 emsg (errormsg );
41604160 if (rettv -> v_type == VAR_LIST )
41614161 {
4162- if (rettv_list_alloc (rettv ) != FAIL && result != NULL )
4162+ if (rettv_list_alloc (rettv ) == OK && result != NULL )
41634163 list_append_string (rettv -> vval .v_list , result , -1 );
41644164 vim_free (result );
41654165 }
@@ -4182,7 +4182,7 @@ f_expand(typval_T *argvars, typval_T *rettv)
41824182 if (rettv -> v_type == VAR_STRING )
41834183 rettv -> vval .v_string = ExpandOne (& xpc , s , NULL ,
41844184 options , WILD_ALL );
4185- else if (rettv_list_alloc (rettv ) != FAIL )
4185+ else if (rettv_list_alloc (rettv ) == OK )
41864186 {
41874187 int i ;
41884188
@@ -4784,7 +4784,7 @@ f_getchangelist(typval_T *argvars, typval_T *rettv)
47844784 dict_T * d ;
47854785 int changelistindex ;
47864786
4787- if (rettv_list_alloc (rettv ) != OK )
4787+ if (rettv_list_alloc (rettv ) == FAIL )
47884788 return ;
47894789
47904790 if (in_vim9script () && check_for_opt_buffer_arg (argvars , 0 ) == FAIL )
@@ -4929,7 +4929,7 @@ f_getcharpos(typval_T *argvars UNUSED, typval_T *rettv)
49294929 static void
49304930f_getcharsearch (typval_T * argvars UNUSED , typval_T * rettv )
49314931{
4932- if (rettv_dict_alloc (rettv ) != FAIL )
4932+ if (rettv_dict_alloc (rettv ) == OK )
49334933 {
49344934 dict_T * dict = rettv -> vval .v_dict ;
49354935
@@ -5016,7 +5016,7 @@ f_getjumplist(typval_T *argvars, typval_T *rettv)
50165016 list_T * l ;
50175017 dict_T * d ;
50185018
5019- if (rettv_list_alloc (rettv ) != OK )
5019+ if (rettv_list_alloc (rettv ) == FAIL )
50205020 return ;
50215021
50225022 if (in_vim9script ()
@@ -5221,7 +5221,7 @@ f_gettagstack(typval_T *argvars, typval_T *rettv)
52215221{
52225222 win_T * wp = curwin ; // default is current window
52235223
5224- if (rettv_dict_alloc (rettv ) != OK )
5224+ if (rettv_dict_alloc (rettv ) == FAIL )
52255225 return ;
52265226
52275227 if (in_vim9script () && check_for_opt_number_arg (argvars , 0 ) == FAIL )
@@ -7879,7 +7879,7 @@ f_printf(typval_T *argvars, typval_T *rettv)
78797879 static void
78807880f_pum_getpos (typval_T * argvars UNUSED , typval_T * rettv UNUSED )
78817881{
7882- if (rettv_dict_alloc (rettv ) != OK )
7882+ if (rettv_dict_alloc (rettv ) == FAIL )
78837883 return ;
78847884 pum_set_event_info (rettv -> vval .v_dict );
78857885}
@@ -8168,7 +8168,7 @@ f_range(typval_T *argvars, typval_T *rettv)
81688168 varnumber_T stride = 1 ;
81698169 int error = FALSE;
81708170
8171- if (rettv_list_alloc (rettv ) != OK )
8171+ if (rettv_list_alloc (rettv ) == FAIL )
81728172 return ;
81738173
81748174 if (in_vim9script ()
@@ -9010,6 +9010,10 @@ do_searchpair(
90109010 if (skip != NULL )
90119011 use_skip = eval_expr_valid_arg (skip );
90129012
9013+ #ifdef FEAT_RELTIME
9014+ if (time_limit > 0 )
9015+ init_regexp_timeout (time_limit );
9016+ #endif
90139017 save_cursor = curwin -> w_cursor ;
90149018 pos = curwin -> w_cursor ;
90159019 CLEAR_POS (& firstpos );
@@ -9021,9 +9025,6 @@ do_searchpair(
90219025
90229026 CLEAR_FIELD (sia );
90239027 sia .sa_stop_lnum = lnum_stop ;
9024- #ifdef FEAT_RELTIME
9025- sia .sa_tm = time_limit ;
9026- #endif
90279028 n = searchit (curwin , curbuf , & pos , NULL , dir , pat , 1L ,
90289029 options , RE_SEARCH , & sia );
90299030 if (n == FAIL || (firstpos .lnum != 0 && EQUAL_POS (pos , firstpos )))
@@ -9109,6 +9110,9 @@ do_searchpair(
91099110 curwin -> w_cursor = save_cursor ;
91109111
91119112theend :
9113+ #ifdef FEAT_RELTIME
9114+ disable_regexp_timeout ();
9115+ #endif
91129116 vim_free (pat2 );
91139117 vim_free (pat3 );
91149118 if (p_cpo == empty_option )
@@ -10232,7 +10236,7 @@ f_synconcealed(typval_T *argvars UNUSED, typval_T *rettv)
1023210236
1023310237 CLEAR_FIELD (str );
1023410238
10235- if (rettv_list_alloc (rettv ) != FAIL )
10239+ if (rettv_list_alloc (rettv ) == OK )
1023610240 {
1023710241 if (lnum >= 1 && lnum <= curbuf -> b_ml .ml_line_count
1023810242 && col >= 0 && col <= (long )STRLEN (ml_get (lnum ))
@@ -10293,7 +10297,7 @@ f_synstack(typval_T *argvars UNUSED, typval_T *rettv)
1029310297
1029410298 if (lnum >= 1 && lnum <= curbuf -> b_ml .ml_line_count
1029510299 && col >= 0 && col <= (long )STRLEN (ml_get (lnum ))
10296- && rettv_list_alloc (rettv ) != FAIL )
10300+ && rettv_list_alloc (rettv ) == OK )
1029710301 {
1029810302 (void )syn_get_id (curwin , lnum , col , FALSE, NULL , TRUE);
1029910303 for (i = 0 ; ; ++ i )
@@ -10328,7 +10332,7 @@ f_tabpagebuflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
1032810332 if (tp != NULL )
1032910333 wp = (tp == curtab ) ? firstwin : tp -> tp_firstwin ;
1033010334 }
10331- if (wp != NULL && rettv_list_alloc (rettv ) != FAIL )
10335+ if (wp != NULL && rettv_list_alloc (rettv ) == OK )
1033210336 {
1033310337 for (; wp != NULL ; wp = wp -> w_next )
1033410338 if (list_append_number (rettv -> vval .v_list ,
0 commit comments