| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
| |
There is nothing wrong with them, just it is generally better to remove
a range then to remove items individually.
|
|
|
| |
tv_list_remove_items() may cause confusion with tv_list_item_remove()
|
| |
|
| |
|
|
|
|
| |
Better write this bit in lua then make reviewers or clint filter out
tv_list_item_alloc().
|
|
|
|
| |
Still left calls in eval/typval.c and test/unit/eval/helpers.lua. Latter is the
only reason why function did not receive `static` modifier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently supported nodes:
- Register as it is one of the simplest value nodes (even numbers are
not that simple with that dot handling).
- Plus, both unary and binary.
- Parenthesis, both nesting and calling.
Note regarding unit tests: it stores data for AST in highlighting in
strings in place of tables because luassert fails to do a good job at
representing big tables. Squashing a bunch of data into a single string
simply yields more readable result.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|\
| |
| | |
unittests: Force GC, fix GC failures in typval_spec
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Not sure whether this is going to fix things though, but core dump does not
contain Neovim functions in stack in this case.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
| |
Also removes NULL key input: tv_dict_find() does not allow this.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Also fixes incorrect location of `tv_dict_add` function and three bugs in other
functions:
1. `tv_dict_add_list` may free list it does not own (vim/vim#1555).
2. `tv_dict_add_dict` may free dictionary it does not own (vim/vim#1555).
3. `tv_dict_add_dict` ignores `key_len` argument.
|
| |
|
|
|
|
| |
Unable to reproduce the problem on Mac OS X Sierra VPS, need to check whether it
is reproducible on travis.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also fixed an error in path_fnamecmp().
|
| |
|
|
|
|
|
|
|
|
| |
Additional modifications:
- More `const` qualifiers in tested functions.
- `tv_list_find_str()` second argument is more in-line with other
`tv_list_find*()` functions.
|