Mercurial > vim
diff src/evalfunc.c @ 28287:dc68c111cf7a v8.2.4669
patch 8.2.4669: in compiled code len('string') is not inlined
Commit: https://github.com/vim/vim/commit/58f331a05f5b7bdddf04e68b6e51a827fd0c43f0
Author: LemonBoy <thatlemon@gmail.com>
Date: Sat Apr 2 21:59:06 2022 +0100
patch 8.2.4669: in compiled code len('string') is not inlined
Problem: In compiled code len('string') is not inlined.
Solution: Compute the length at compile time if possible. (closes https://github.com/vim/vim/issues/10065)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 02 Apr 2022 23:00:05 +0200 |
parents | 2fd2ce8a556c |
children | 9849df834f1d |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -90,7 +90,6 @@ static void f_interrupt(typval_T *argvar static void f_invert(typval_T *argvars, typval_T *rettv); static void f_islocked(typval_T *argvars, typval_T *rettv); static void f_last_buffer_nr(typval_T *argvars, typval_T *rettv); -static void f_len(typval_T *argvars, typval_T *rettv); static void f_libcall(typval_T *argvars, typval_T *rettv); static void f_libcallnr(typval_T *argvars, typval_T *rettv); static void f_line(typval_T *argvars, typval_T *rettv); @@ -7019,7 +7018,7 @@ f_last_buffer_nr(typval_T *argvars UNUSE /* * "len()" function */ - static void + void f_len(typval_T *argvars, typval_T *rettv) { switch (argvars[0].v_type)