Lines Matching refs:tv

131     typval_T	*tv;  in exe_newlist()  local
144 tv = STACK_TV_BOT(-1); in exe_newlist()
145 tv->v_type = VAR_LIST; in exe_newlist()
146 tv->vval.v_list = list; in exe_newlist()
174 dict_stack_save(typval_T *tv) in dict_stack_save() argument
180 ((typval_T *)dict_stack.ga_data)[dict_stack.ga_len] = *tv; in dict_stack_save()
202 typval_T *tv; in dict_stack_get_dict() local
206 tv = ((typval_T *)dict_stack.ga_data) + dict_stack.ga_len - 1; in dict_stack_get_dict()
207 if (tv->v_type == VAR_DICT) in dict_stack_get_dict()
208 return tv->vval.v_dict; in dict_stack_get_dict()
403 typval_T *tv = STACK_TV_BOT(STACK_FRAME_SIZE + dfunc->df_varcount); in call_dfunc() local
405 tv->v_type = VAR_NUMBER; in call_dfunc()
406 tv->vval.v_number = 0; in call_dfunc()
486 typval_T *tv; in handle_closure_in_use() local
495 tv = STACK_TV(ectx->ec_frame_idx + STACK_FRAME_SIZE + dfunc->df_varcount); in handle_closure_in_use()
496 closure_count = tv->vval.v_number; in handle_closure_in_use()
556 tv = STACK_TV(top + idx); in handle_closure_in_use()
559 *(stack + idx) = *tv; in handle_closure_in_use()
560 tv->v_type = VAR_UNKNOWN; in handle_closure_in_use()
563 copy_tv(tv, stack + idx); in handle_closure_in_use()
568 tv = STACK_TV(ectx->ec_frame_idx + STACK_FRAME_SIZE + idx); in handle_closure_in_use()
575 if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL) in handle_closure_in_use()
580 if (tv->vval.v_partial == ((partial_T **)gap->ga_data)[ in handle_closure_in_use()
585 *(stack + funcstack->fs_var_offset + idx) = *tv; in handle_closure_in_use()
586 tv->v_type = VAR_UNKNOWN; in handle_closure_in_use()
630 typval_T *tv = ((typval_T *)gap->ga_data) + i; in funcstack_check_refcount() local
632 if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL in funcstack_check_refcount()
633 && tv->vval.v_partial->pt_funcstack == funcstack in funcstack_check_refcount()
634 && tv->vval.v_partial->pt_refcount == 1) in funcstack_check_refcount()
764 typval_T *tv; in call_prepare() local
780 tv = STACK_TV_BOT(-1); in call_prepare()
781 tv->v_type = VAR_NUMBER; in call_prepare()
782 tv->vval.v_number = 0; in call_prepare()
999 typval_T *tv, in call_partial() argument
1009 if (tv->v_type == VAR_PARTIAL) in call_partial()
1011 partial_T *pt = tv->vval.v_partial; in call_partial()
1036 else if (tv->v_type == VAR_FUNC) in call_partial()
1037 name = tv->vval.v_string; in call_partial()
1083 check_for_number(typval_T *tv) in check_for_number() argument
1085 if (tv->v_type != VAR_NUMBER) in check_for_number()
1088 vartype_name(VAR_NUMBER), vartype_name(tv->v_type)); in check_for_number()
1099 store_var(char_u *name, typval_T *tv) in store_var() argument
1104 if (tv->v_lock) in store_var()
1107 set_var_const(name, NULL, tv, FALSE, flags, 0); in store_var()
1116 do_2string(typval_T *tv, int is_2string_any, int tolerant) in do_2string() argument
1118 if (tv->v_type != VAR_STRING) in do_2string()
1124 switch (tv->v_type) in do_2string()
1143 str = typval2string(tv, TRUE); in do_2string()
1161 clear_tv(tv); in do_2string()
1162 tv->v_type = VAR_STRING; in do_2string()
1163 tv->vval.v_string = ga.ga_data; in do_2string()
1167 default: to_string_error(tv->v_type); in do_2string()
1171 str = typval_tostring(tv, TRUE); in do_2string()
1172 clear_tv(tv); in do_2string()
1173 tv->v_type = VAR_STRING; in do_2string()
1174 tv->vval.v_string = str; in do_2string()
1183 allocate_if_null(typval_T *tv) in allocate_if_null() argument
1185 switch (tv->v_type) in allocate_if_null()
1188 if (tv->vval.v_list == NULL) in allocate_if_null()
1189 (void)rettv_list_alloc(tv); in allocate_if_null()
1192 if (tv->vval.v_dict == NULL) in allocate_if_null()
1193 (void)rettv_dict_alloc(tv); in allocate_if_null()
1196 if (tv->vval.v_blob == NULL) in allocate_if_null()
1197 (void)rettv_blob_alloc(tv); in allocate_if_null()
1660 typval_T *tv; in exec_instructions() local
1725 tv = STACK_TV_BOT(0); in exec_instructions()
1726 tv->v_type = VAR_NUMBER; in exec_instructions()
1727 tv->vval.v_number = 0; in exec_instructions()
1787 tv = STACK_TV_BOT(0); in exec_instructions()
1788 init_tv(tv); in exec_instructions()
1790 res = eval0(arg, tv, NULL, &EVALARG_EVALUATE); in exec_instructions()
1803 tv = STACK_TV_BOT(0); in exec_instructions()
1804 tv->vval.v_instr = ALLOC_ONE(instr_T); in exec_instructions()
1805 if (tv->vval.v_instr == NULL) in exec_instructions()
1809 tv->v_type = VAR_INSTR; in exec_instructions()
1810 tv->vval.v_instr->instr_ectx = ectx; in exec_instructions()
1811 tv->vval.v_instr->instr_instr = iptr->isn_arg.instr; in exec_instructions()
1871 tv = STACK_TV_BOT(0); in exec_instructions()
1872 tv->v_type = VAR_STRING; in exec_instructions()
1873 tv->vval.v_string = res; in exec_instructions()
1896 tv = STACK_TV_BOT(0); in exec_instructions()
1897 res = cexpr_core(&ea, tv); in exec_instructions()
1898 clear_tv(tv); in exec_instructions()
1919 tv = STACK_TV_BOT(i - count); in exec_instructions()
1920 str = tv->vval.v_string; in exec_instructions()
1928 clear_tv(tv); in exec_instructions()
1955 tv = STACK_TV_BOT(idx - count); in exec_instructions()
1956 echo_one(tv, iptr->isn_arg.echo.echo_with_white, in exec_instructions()
1958 clear_tv(tv); in exec_instructions()
1986 tv = STACK_TV_BOT(idx - count); in exec_instructions()
1989 if (tv->v_type == VAR_CHANNEL in exec_instructions()
1990 || tv->v_type == VAR_JOB) in exec_instructions()
1994 vartype_name(tv->v_type)); in exec_instructions()
1998 p = tv_get_string_buf(tv, buf); in exec_instructions()
2001 p = tv_stringify(tv, buf); in exec_instructions()
2013 clear_tv(tv); in exec_instructions()
2200 tv = STACK_TV_BOT(0); in exec_instructions()
2201 tv->v_type = VAR_DICT; in exec_instructions()
2202 tv->v_lock = 0; in exec_instructions()
2203 tv->vval.v_dict = d; in exec_instructions()
2245 tv = STACK_TV_BOT(0); in exec_instructions()
2246 tv->v_type = VAR_STRING; in exec_instructions()
2247 tv->v_lock = 0; in exec_instructions()
2250 tv->vval.v_string = get_reg_contents( in exec_instructions()
2258 tv = STACK_TV_VAR(iptr->isn_arg.number); in exec_instructions()
2259 clear_tv(tv); in exec_instructions()
2260 *tv = *STACK_TV_BOT(0); in exec_instructions()
2321 tv = STACK_TV_BOT(0); in exec_instructions()
2322 if (tv->v_type == VAR_STRING) in exec_instructions()
2324 s = tv->vval.v_string; in exec_instructions()
2330 n = tv->vval.v_number; in exec_instructions()
2333 clear_tv(tv); in exec_instructions()
2346 tv = STACK_TV_BOT(0); in exec_instructions()
2347 vim_setenv_ext(iptr->isn_arg.string, tv_get_string(tv)); in exec_instructions()
2348 clear_tv(tv); in exec_instructions()
2357 tv = STACK_TV_BOT(0); in exec_instructions()
2358 write_reg_contents(reg, tv_get_string(tv), -1, FALSE); in exec_instructions()
2359 clear_tv(tv); in exec_instructions()
2425 tv = STACK_TV_VAR(iptr->isn_arg.storenr.stnr_idx); in exec_instructions()
2426 clear_tv(tv); in exec_instructions()
2427 tv->v_type = VAR_NUMBER; in exec_instructions()
2428 tv->vval.v_number = iptr->isn_arg.storenr.stnr_val; in exec_instructions()
2443 tv = STACK_TV_BOT(-3); in exec_instructions()
2493 li->li_tv = *tv; in exec_instructions()
2501 if (list_append_tv(list, tv) == FAIL) in exec_instructions()
2503 clear_tv(tv); in exec_instructions()
2528 di->di_tv = *tv; in exec_instructions()
2536 if (dict_add_tv(dict, (char *)key, tv) == FAIL) in exec_instructions()
2538 clear_tv(tv); in exec_instructions()
2568 nr = tv_get_number_chk(tv, &error); in exec_instructions()
2584 clear_tv(tv); in exec_instructions()
2603 tv = STACK_TV_BOT(-4); in exec_instructions()
2638 tv->vval.v_list, in exec_instructions()
2677 tv_dest->vval.v_blob, n1, n2, tv); in exec_instructions()
2691 clear_tv(tv); in exec_instructions()
2717 tv = ((typval_T *)outer->out_stack->ga_data) in exec_instructions()
2724 copy_tv(tv, STACK_TV_BOT(0)); in exec_instructions()
2730 clear_tv(tv); in exec_instructions()
2731 *tv = *STACK_TV_BOT(0); in exec_instructions()
2912 tv = STACK_TV_BOT(0); in exec_instructions()
2913 tv->v_lock = 0; in exec_instructions()
2918 tv->v_type = VAR_NUMBER; in exec_instructions()
2919 tv->vval.v_number = iptr->isn_arg.number; in exec_instructions()
2922 tv->v_type = VAR_BOOL; in exec_instructions()
2923 tv->vval.v_number = iptr->isn_arg.number; in exec_instructions()
2926 tv->v_type = VAR_SPECIAL; in exec_instructions()
2927 tv->vval.v_number = iptr->isn_arg.number; in exec_instructions()
2931 tv->v_type = VAR_FLOAT; in exec_instructions()
2932 tv->vval.v_float = iptr->isn_arg.fnumber; in exec_instructions()
2936 blob_copy(iptr->isn_arg.blob, tv); in exec_instructions()
2939 tv->v_type = VAR_FUNC; in exec_instructions()
2941 tv->vval.v_string = NULL; in exec_instructions()
2943 tv->vval.v_string = in exec_instructions()
2948 tv->v_type = VAR_CHANNEL; in exec_instructions()
2949 tv->vval.v_channel = iptr->isn_arg.channel; in exec_instructions()
2950 if (tv->vval.v_channel != NULL) in exec_instructions()
2951 ++tv->vval.v_channel->ch_refcount; in exec_instructions()
2956 tv->v_type = VAR_JOB; in exec_instructions()
2957 tv->vval.v_job = iptr->isn_arg.job; in exec_instructions()
2958 if (tv->vval.v_job != NULL) in exec_instructions()
2959 ++tv->vval.v_job->jv_refcount; in exec_instructions()
2963 tv->v_type = VAR_STRING; in exec_instructions()
2964 tv->vval.v_string = vim_strsave( in exec_instructions()
3021 tv = STACK_TV_BOT(2 * (idx - count)); in exec_instructions()
3023 key = tv->vval.v_string == NULL in exec_instructions()
3024 ? (char_u *)"" : tv->vval.v_string; in exec_instructions()
3034 clear_tv(tv); in exec_instructions()
3056 tv = STACK_TV_BOT(-1); in exec_instructions()
3057 tv->v_type = VAR_DICT; in exec_instructions()
3058 tv->v_lock = 0; in exec_instructions()
3059 tv->vval.v_dict = dict; in exec_instructions()
3094 tv = STACK_TV_BOT(-pfunc->cpf_argcount - 1); in exec_instructions()
3101 tv = &partial_tv; in exec_instructions()
3103 r = call_partial(tv, pfunc->cpf_argcount, ectx); in exec_instructions()
3104 if (tv == &partial_tv) in exec_instructions()
3136 tv = STACK_TV_BOT(0); in exec_instructions()
3138 tv->v_type = VAR_VOID; in exec_instructions()
3139 tv->vval.v_number = 0; in exec_instructions()
3140 tv->v_lock = 0; in exec_instructions()
3184 tv = STACK_TV_BOT(0); in exec_instructions()
3186 tv->vval.v_partial = pt; in exec_instructions()
3187 tv->v_type = VAR_PARTIAL; in exec_instructions()
3188 tv->v_lock = 0; in exec_instructions()
3226 tv = STACK_TV_BOT(-1); in exec_instructions()
3232 jump = tv_get_bool_chk(tv, &error); in exec_instructions()
3237 jump = tv2bool(tv); in exec_instructions()
3245 clear_tv(tv); in exec_instructions()
3257 tv = STACK_TV_VAR(iptr->isn_arg.jumparg.jump_arg_off); in exec_instructions()
3258 if (tv->v_type != VAR_UNKNOWN in exec_instructions()
3259 && !(tv->v_type == VAR_SPECIAL in exec_instructions()
3260 && tv->vval.v_number == VVAL_NONE)) in exec_instructions()
3289 tv = STACK_TV_BOT(0); in exec_instructions()
3290 tv->v_type = VAR_NUMBER; in exec_instructions()
3291 tv->v_lock = 0; in exec_instructions()
3292 tv->vval.v_number = list_find_nr( in exec_instructions()
3323 tv = STACK_TV_BOT(0); in exec_instructions()
3324 tv->v_type = VAR_STRING; in exec_instructions()
3325 tv->vval.v_string = vim_strnsave( in exec_instructions()
3357 tv = STACK_TV_BOT(0); in exec_instructions()
3358 tv->v_type = VAR_NUMBER; in exec_instructions()
3359 tv->vval.v_number = blob_get(blob, in exec_instructions()
3405 tv = STACK_TV_BOT(0); in exec_instructions()
3407 tv->v_type = VAR_STRING; in exec_instructions()
3408 tv->v_lock = 0; in exec_instructions()
3409 tv->vval.v_string = vim_strsave( in exec_instructions()
3521 tv = STACK_TV_BOT(-1); in exec_instructions()
3522 clear_tv(tv); in exec_instructions()
3523 tv->v_type = VAR_NUMBER; in exec_instructions()
3524 tv->vval.v_number = 0; in exec_instructions()
3528 tv = STACK_TV_BOT(0); in exec_instructions()
3529 if (tv->vval.v_string == NULL in exec_instructions()
3530 || *skipwhite(tv->vval.v_string) == NUL) in exec_instructions()
3532 vim_free(tv->vval.v_string); in exec_instructions()
3554 if (throw_exception(tv->vval.v_string, ET_USER, NULL) in exec_instructions()
3557 vim_free(tv->vval.v_string); in exec_instructions()
3952 tv = STACK_TV_BOT(-2); in exec_instructions()
3953 n1 = tv->vval.v_number; in exec_instructions()
3956 tv = STACK_TV_BOT(-1); in exec_instructions()
3957 n2 = tv->vval.v_number; in exec_instructions()
3960 tv = STACK_TV_BOT(-1); in exec_instructions()
3963 res = string_slice(tv->vval.v_string, n1, n2, FALSE); in exec_instructions()
3969 res = char_from_string(tv->vval.v_string, n2); in exec_instructions()
3970 vim_free(tv->vval.v_string); in exec_instructions()
3971 tv->vval.v_string = res; in exec_instructions()
3993 tv = STACK_TV_BOT(-1); in exec_instructions()
3994 n1 = n2 = tv->vval.v_number; in exec_instructions()
3995 clear_tv(tv); in exec_instructions()
3999 tv = STACK_TV_BOT(-2); in exec_instructions()
4000 n1 = tv->vval.v_number; in exec_instructions()
4001 clear_tv(tv); in exec_instructions()
4005 tv = STACK_TV_BOT(-1); in exec_instructions()
4010 n1, n2, FALSE, tv) == FAIL) in exec_instructions()
4016 n1, n2, FALSE, tv, TRUE) == FAIL) in exec_instructions()
4032 tv = is_slice ? STACK_TV_BOT(-3) : STACK_TV_BOT(-2); in exec_instructions()
4034 if (check_can_index(tv, TRUE, TRUE) == FAIL) in exec_instructions()
4038 res = eval_index_inner(tv, is_slice, var1, var2, in exec_instructions()
4055 tv = STACK_TV_BOT(-1); in exec_instructions()
4056 list = tv->vval.v_list; in exec_instructions()
4067 tv->vval.v_list = newlist; in exec_instructions()
4081 tv = STACK_TV_BOT(-1 - gi->gi_with_op); in exec_instructions()
4082 li = list_find(tv->vval.v_list, gi->gi_index); in exec_instructions()
4103 tv = STACK_TV_BOT(-2); in exec_instructions()
4105 dict = tv->vval.v_dict; in exec_instructions()
4107 tv = STACK_TV_BOT(-1); in exec_instructions()
4109 key = tv->vval.v_string; in exec_instructions()
4121 clear_tv(tv); in exec_instructions()
4123 tv = STACK_TV_BOT(-1); in exec_instructions()
4124 (void) dict_stack_save(tv); in exec_instructions()
4125 tv->v_type = VAR_NUMBER; in exec_instructions()
4126 tv->vval.v_number = 0; in exec_instructions()
4129 clear_tv(tv); in exec_instructions()
4133 tv = STACK_TV_BOT(-1); in exec_instructions()
4134 if (dict_stack_save(tv) == FAIL) in exec_instructions()
4136 copy_tv(&di->di_tv, tv); in exec_instructions()
4146 tv = STACK_TV_BOT(-1); in exec_instructions()
4147 if (tv->v_type != VAR_DICT || tv->vval.v_dict == NULL) in exec_instructions()
4153 dict = tv->vval.v_dict; in exec_instructions()
4164 if (dict_stack_save(tv) == FAIL) in exec_instructions()
4167 copy_tv(&di->di_tv, tv); in exec_instructions()
4182 tv = STACK_TV_BOT(-1); in exec_instructions()
4186 && (tv->v_type == VAR_FUNC in exec_instructions()
4187 || (tv->v_type == VAR_PARTIAL in exec_instructions()
4188 && (tv->vval.v_partial->pt_auto in exec_instructions()
4189 || tv->vval.v_partial->pt_dict == NULL)))) in exec_instructions()
4191 make_partial(dict_tv->vval.v_dict, tv); in exec_instructions()
4197 tv = STACK_TV_BOT(-1); in exec_instructions()
4198 if (tv->v_type != VAR_NUMBER in exec_instructions()
4200 && tv->v_type != VAR_FLOAT in exec_instructions()
4209 if (tv->v_type == VAR_FLOAT) in exec_instructions()
4210 tv->vval.v_float = -tv->vval.v_float; in exec_instructions()
4213 tv->vval.v_number = -tv->vval.v_number; in exec_instructions()
4220 tv = STACK_TV_BOT(-1); in exec_instructions()
4222 if (check_not_string(tv) == FAIL) in exec_instructions()
4224 (void)tv_get_number_chk(tv, &error); in exec_instructions()
4234 tv = STACK_TV_BOT((int)ct->ct_off); in exec_instructions()
4238 if (check_typval_type(ct->ct_type, tv, ectx->ec_where) in exec_instructions()
4245 if (tv->v_type == VAR_NUMBER in exec_instructions()
4247 && (tv->vval.v_number == 0 in exec_instructions()
4248 || tv->vval.v_number == 1)) in exec_instructions()
4250 tv->v_type = VAR_BOOL; in exec_instructions()
4251 tv->vval.v_number = tv->vval.v_number in exec_instructions()
4262 tv = STACK_TV_BOT(-1); in exec_instructions()
4263 if (tv->v_type == VAR_LIST) in exec_instructions()
4264 list = tv->vval.v_list; in exec_instructions()
4281 tv = STACK_TV_BOT(-1); in exec_instructions()
4282 if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) in exec_instructions()
4284 free_type(tv->vval.v_dict->dv_type); in exec_instructions()
4285 tv->vval.v_dict->dv_type = alloc_type(ct->ct_type); in exec_instructions()
4287 else if (tv->v_type == VAR_LIST && tv->vval.v_list != NULL) in exec_instructions()
4289 free_type(tv->vval.v_list->lv_type); in exec_instructions()
4290 tv->vval.v_list->lv_type = alloc_type(ct->ct_type); in exec_instructions()
4303 tv = STACK_TV_BOT(iptr->isn_arg.tobool.offset); in exec_instructions()
4304 n = tv2bool(tv); in exec_instructions()
4310 tv = STACK_TV_BOT(-1); in exec_instructions()
4312 n = tv_get_bool_chk(tv, &error); in exec_instructions()
4316 clear_tv(tv); in exec_instructions()
4317 tv->v_type = VAR_BOOL; in exec_instructions()
4318 tv->vval.v_number = n ? VVAL_TRUE : VVAL_FALSE; in exec_instructions()
4347 tv = STACK_TV_BOT(-1); in exec_instructions()
4348 tv->v_type = VAR_NUMBER; in exec_instructions()
4349 tv->v_lock = 0; in exec_instructions()
4351 tv->vval.v_number = curwin->w_cursor.lnum; in exec_instructions()
4353 tv->vval.v_number = ea.line2; in exec_instructions()
4367 tv = STACK_TV_BOT(-1); in exec_instructions()
4368 curwin->w_cursor.lnum = tv->vval.v_number; in exec_instructions()
4381 tv = STACK_TV_BOT(-1); in exec_instructions()
4382 if (tv->v_type == VAR_STRING) in exec_instructions()
4383 expr = tv->vval.v_string; in exec_instructions()
4386 expr = typval2string(tv, TRUE); // allocates value in exec_instructions()
4387 clear_tv(tv); in exec_instructions()
4423 tv = STACK_TV_BOT(-1); in exec_instructions()
4424 if (tv->v_type != VAR_LIST) in exec_instructions()
4430 l = tv->vval.v_list; in exec_instructions()
4459 tv = STACK_TV_BOT(-count); in exec_instructions()
4460 tv->vval.v_list = rem_list; in exec_instructions()
4462 tv->v_lock = 0; in exec_instructions()
4478 tv = STACK_TV_BOT(-i - 1); in exec_instructions()
4479 copy_tv(&li->li_tv, tv); in exec_instructions()
4593 exe_typval_instr(typval_T *tv, typval_T *rettv) in exe_typval_instr() argument
4595 ectx_T *ectx = tv->vval.v_instr->instr_ectx; in exe_typval_instr()
4600 ectx->ec_instr = tv->vval.v_instr->instr_instr; in exe_typval_instr()
4629 typval_T *tv = STACK_TV_BOT(-1); in exe_substitute_instr() local
4631 res = typval2string(tv, TRUE); in exe_substitute_instr()
4633 clear_tv(tv); in exe_substitute_instr()
4661 typval_T *tv; in call_def_function() local
4788 tv = STACK_TV_BOT(-1); in call_def_function()
4792 && tv->vval.v_list != NULL) in call_def_function()
4795 listitem_T *li = tv->vval.v_list->lv_first; in call_def_function()
4925 tv = STACK_TV_BOT(-1); in call_def_function()
4926 *rettv = *tv; in call_def_function()
4927 tv->v_type = VAR_UNKNOWN; in call_def_function()
5363 typval_T tv; in list_instructions() local
5367 tv.v_type = VAR_JOB; in list_instructions()
5368 tv.vval.v_job = iptr->isn_arg.job; in list_instructions()
5369 name = job_to_string_buf(&tv, buf); in list_instructions()
5931 tv2bool(typval_T *tv) in tv2bool() argument
5933 switch (tv->v_type) in tv2bool()
5936 return tv->vval.v_number != 0; in tv2bool()
5939 return tv->vval.v_float != 0.0; in tv2bool()
5944 return tv->vval.v_partial != NULL; in tv2bool()
5947 return tv->vval.v_string != NULL && *tv->vval.v_string != NUL; in tv2bool()
5949 return tv->vval.v_list != NULL && tv->vval.v_list->lv_len > 0; in tv2bool()
5951 return tv->vval.v_dict != NULL in tv2bool()
5952 && tv->vval.v_dict->dv_hashtab.ht_used > 0; in tv2bool()
5955 return tv->vval.v_number == VVAL_TRUE ? TRUE : FALSE; in tv2bool()
5958 return tv->vval.v_job != NULL; in tv2bool()
5964 return tv->vval.v_channel != NULL; in tv2bool()
5969 return tv->vval.v_blob != NULL && tv->vval.v_blob->bv_ga.ga_len > 0; in tv2bool()
5980 emsg_using_string_as(typval_T *tv, int as_number) in emsg_using_string_as() argument
5984 tv->vval.v_string == NULL in emsg_using_string_as()
5985 ? (char_u *)"" : tv->vval.v_string); in emsg_using_string_as()
5992 check_not_string(typval_T *tv) in check_not_string() argument
5994 if (tv->v_type == VAR_STRING) in check_not_string()
5996 emsg_using_string_as(tv, TRUE); in check_not_string()
5997 clear_tv(tv); in check_not_string()