aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval.h
Commit message (Collapse)AuthorAge
...
* Merge #11851 'eval.c: factor out eval/userfunc.c'Justin M. Keyes2020-04-26
|\ | | | | | | vim-patch:7.4.2058
| * fix: header updatesJakub Łuczyński2020-02-13
| |
* | nvim:eval: Fix enum declaration for ListLenSpecialsAndreas Schneider2020-02-23
|/ | | | | | | | | | | Instead of declaring an enum, this creates a global variable. As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. Each time this header is included, we define the enum name as a global variable. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
* PVS/V618: fix emsgf format specifier #11643Husain Alshehhi2020-01-01
|
* vim-patch:8.2.0025: repeated word in comment (#11586)Jan Edmund Lazo2019-12-21
| | | | | Problem: Repeated word in comment. Solution: Remove one. (Rene Nyffenegger, closes vim/vim#5384) https://github.com/vim/vim/commit/fe72d08400d9064b3f959f1f62f279527e64835a
* Remove excess <stdint.h>Jan Edmund Lazo2019-09-11
|
* vim-patch:8.1.0515: reloading a script gives errors for existing functionserw72019-09-04
| | | | | | Problem: Reloading a script gives errors for existing functions. Solution: Allow redefining a function once when reloading a script. https://github.com/vim/vim/commit/ded5f1bed7ff2d138b3ee0f9610d17290b62692d
* vim-patch:8.1.0362: cannot get the script line number when executing a functionerw72019-09-04
| | | | | | | Problem: Cannot get the script line number when executing a function. Solution: Store the line number besides the script ID. (Ozaki Kiichi, closes vim/vim#3362) Also display the line number with ":verbose set". https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761
* vim-patch:8.1.0130: ":profdel func" does not work if func was called alreadyDaniel Hahler2019-06-08
| | | | | | | | Problem: ":profdel func" does not work if func was called already. (Dominique Pelle) Solution: Reset uf_profiling and add a flag to indicate initialization was done. https://github.com/vim/vim/commit/ad6480961080f80a455b2394f27b02935a2ded52
* vim-patch:8.0.1590: padding in list type wastes memory (#9119)Jan Edmund Lazo2018-10-13
| | | | | | Problem: Padding in list type wastes memory. Solution: Reorder struct members to optimize padding. (Dominique Pelle, closes vim/vim#2704) https://github.com/vim/vim/commit/1a840240376f2858d489736f9eed6d2975225fdf
* vim-patch:8.0.0593: DRY: setting list/dict return value (#8639)Jan Edmund Lazo2018-06-30
| | | | | Problem: Duplication of code for adding a list or dict return value. Solution: Add rettv_dict_set() and rettv_list_set(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/45cf6e910c6d162775ca9d470fac4b6db844001f
* eval/typval: Remove struct dictitem_S which is not used anywhereZyX2018-04-20
|
* eval: Fix PVS/V547: ufunc_T is actually an incomplete typeZyX2018-04-10
|
* build/MSVC: fix "C4003: not enough actual parameters for macro"Justin M. Keyes2018-03-18
| | | | | | For the case of TV_DICTITEM_STRUCT, we can't just pass `1` because: https://github.com/neovim/neovim/pull/8142#discussion_r175262436 > this variant will trigger array overrun warnings from various static analyzers.
* eval/typval: Log list actionsZyX2018-01-14
| | | | | | | | | | New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more efficient it is allocated as a linked list with chunks of length 2^(7+chunk_num); that uses basically the same idea as behind increasing kvec length (make appending O(1) (amortized)), but reduces constant by not bothering to move memory around what realloc() would surely do: it is not like we need random access to log entries here to justify usage of a single continuous memory block.
* *: Provide list length when allocating listsZyX2018-01-14
|
* eval: Refactor some potentially dangerous list appendsZyX2017-12-25
|
* clint,eval: Make linter check for direct usage of list attributesZyX2017-12-12
|
* eval/typval: Fix typoZyX2017-12-11
| | | [ci skip]
* *: Finish hiding list implementationZyX2017-12-11
|
* *: Hide list implementation in other files as wellZyX2017-12-10
|
* *: Start hiding list implementationZyX2017-12-10
| | | | Most of files, except for eval.c and eval/* were only processed by perl.
* eval/typval: Add macros useful for hiding list item implementationZyX2017-12-10
|
* eval/typval: Add functions useful for hiding list implementationZyX2017-12-10
|
* ex_getln: Replace global with entry in save_cclineZyX2017-07-17
|
* vim-patch:7.4.1976James McCoy2017-06-04
| | | | | | | Problem: Number variables are not 64 bits while they could be. Solution: Add the num64 feature. (Ken Takata) https://github.com/vim/vim/commit/22fcfad29276bd5f317faf516637dcd491b96a12
* unittests: Add a test for TV_CSTRINGZyX2017-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not using enum{} because SIZE_MAX exceeds integer and I do not really like how enum definition is described in C99: 1. Even though all values must fit into the chosen type (6.7.2.2, p 4) the type to choose is still implementation-defined. 2. 6.4.4.3 explicitly states that “an identifier declared as an enumeration constant has type `int`”. So it looks like “no matter what type was chosen for enumeration, constants will be integers”. Yet the following simple program: #include <stdint.h> #include <stdio.h> #include <stddef.h> enum { X=SIZE_MAX }; int main(int argc, char **argv) { printf("x:%zu m:%zu t:%zu v:%zu", sizeof(X), sizeof(SIZE_MAX), sizeof(size_t), (size_t)X); } yields one of the following using different compilers: - clang/gcc/pathcc: `x:8 m:8 t:8 v:18446744073709551615` - pcc/tcc: `x:4 m:8 t:8 v:1844674407370955161` If I remove the cast of X to size_t then pcc/tcc both yield `x:4 m:8 t:8 v:4294967295`, other compilers’ output does not change. All compilers were called with `$compiler -std=c99 -xc -` (feeding program from echo), except for `tcc` which has missing `-std=c99`. `pcc` seems to ignore the argument though: it is perfectly fine with `-std=c1000`.
* eval: Change the point at which arg_errmsg and its length are changedZyX2017-04-14
| | | | Ref #6437
* eval: Use tv_is_func in place of ==VAR_FUNC||==VAR_PARTIALZyX2017-03-29
| | | | Also fixes same error as in vim/vim#1557
* eval: Move part of dictwatcher* functions to eval/typvalZyX2017-03-29
|
* eval/typval: Add missing includes, also add a script to find themZyX2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains unfinished attempt to integrate IWYU (ref #549). To finish it different job should be done, specifically: - Instead of feeding IWYU with modified file a mirror source tree should be created with the help of CMake which will contain modified sources. This solves the problem with IWYU thinking that `*.generated.h` headers should be included in place of `*` headers. - Build IWYU as all other third-party utilities. - Make modified sources avoid problems with `nvim/func_attr.h` includes and various related tricks. Current script may only be used for manual checks like this: ./scripts/check-includes.py \ --generated-includes-dir build/include \ --generated-includes-dir build/src/nvim/auto \ --file src/nvim/eval/typval.c \ -- -Isrc -Ibuild/include -Ibuild/src/nvim/auto \ -DINCLUDE_GENERATED_DECLARATIONS (it is also somewhat fine with `--file src/nvim/eval/typval.h`). I have no idea why (I mean, why developer think that these lines are needed, why they are suggested is pretty obvious: because there is typedef which mentions them before structs are defined), but for typval.h it reports, among other things, that it should add lines struct dictvar_S; struct listitem_S; struct listvar_S; struct listwatch_S;
* eval: Fix max_min functionsZyX2017-03-29
| | | | | | Found two bugs: 1. Multiple unneeded error messages, vim/vim#1039. 2. Unformatted error string, vim/vim#1040.
* eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
|
* eval: Move get_tv_lnum and get_tv_float to eval/typval.hZyX2017-03-29
| | | | | | | | | Additionally - Rename former tv_get_float to tv_get_float_chk due to name conflict (former get_tv_float is better suited for being tv_get_float). - Add E907 error to get_tv_float() and test that it is being raised when appropriate.
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* eval: Move get_float_arg to typval.hZyX2017-03-29
| | | | | | Assuming `inline` is there for a reason, so it is kept and function was moved to typval.h and not to typval.c which does not have problems with #including message.h.
* eval: Split and move dict_add_nr_str to typval.cZyX2017-03-29
| | | | Function was split into tv_dict_add_nr() and tv_dict_add_str().
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* eval: Split eval.c into smaller filesZyX2017-03-29