2016-05-15 13:10 GMT+03:00 Björn Linse <[email protected]>:
> timer_stop("some string") etc should probably be an error.

No. It is the usualy automatic string-to-number conversion,
timer_stop("2") is not expected to be an error.

In any case, e_invarg is the worst choice of the error message.

>
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -20733,6 +20733,11 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
>      static void
>  f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED)
>  {
> +    if (argvars[0].v_type != VAR_NUMBER)
> +    {
> +         EMSG(_(e_invarg));
> +         return;
> +    }
>      timer_T *timer = find_timer(get_tv_number(&argvars[0]));
>
>      if (timer != NULL)
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui