| Commit message (Collapse) | Author | Age |
... | |
| | |
|
|\ \
| | |
| | | |
Remove project-specific integer types: long_u. (1)
|
| | |
| | |
| | |
| | |
| | | |
- Add hashtab.[ch] to clint file.
- Fix clint errors.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Current type of some other parameters/variables can be improved:
- hashtab_T : ht_error : int -> bool.
- hash_clear_all() : off : int -> unsigned int.
- hash_clear_all() : todo : long -> size_t.
- hash_may_resize() : todo : int -> size_t.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
hashtab.h:
- hash_T: long_u -> size_t.
In principle, a hash value could thought of as just an unsigned number
without size semantics (uint32_t or uint64_t). But it is used as
index at some places, and so, size_t is also eligible. Therea re some
places where assignments occur between hash_T and size_t variables, in
both directions. Therefore, if we define hash_T to be of a type having
a different width than that of size_t, we will have an incorrect
assignment somewhere that will require an assert/guard. So the most
sensible option here seems to do hast_T to be size_t too.
- hashtab_T.ht_mask: long_u -> hash_T.
Masks are used to be combined with hash_T values, so they should be of
the same type.
hashtab.c:
- hash_may_resize(): oldsize: long_u -> size_t.
- hash_may_resize(): newsize: long_u -> size_t.
- hash_may_resize(): newmask: long_u -> hash_T.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add hashtab.c to converted files list.
- Fix conversion issues:
* hash_lookup() : idx : unsigned -> hash_T.
* hash_may_resize() : minitems : int -> size_t.
* hash_may_resize() : newi : unsigned -> hash_T.
* hash_may_resize() : minsize : long_u -> size_t.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
hashtab.h:
- Add missing includes.
- Move hash_T to the top and use it to define hashtab_T.
- Move hash_removed related definitions to the top, as they are used in
the definition of hashtab_T.
- Reformat multiline expression (start continuation with operator).
- Reformat function declaration into one single line.
hashtab.c:
- Use C99 style variable declarations (move declarations as near to
first-usage point as possible).
- Simplify oldarray/newarray computation.
- Simplify unneeded else branch.
- Remove redundant casts.
|
| | |
| | |
| | |
| | |
| | | |
- Restyle comments (/// when appropiate, // otherwise).
- Improve comments (add new comments, augment/clarify existing ones).
|
|/ /
| |
| |
| |
| | |
Remove long_u occurrences due to do_outofmem_msg() function.
Refactor size parameter from long_u into size_t.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add a 'expect' utility script that can run simple API tests using clients
developed for any platform.
- Extend travis build matrix to run API tests using the python client and
valgrind.
This script can be used to write API tests without having to manage nvim's
lifetime:
- It starts a single nvim instance listening on a known socket
- Invokes the test runner, which should connect to NEOVIM_LISTEN_ADDRESS
- The nvim instance started by the script provides a `BeforeEachTest` function,
which should be called before each test to reset nvim to a clean state.
- It takes care of shutting down nvim once the tests are finished.
As explained
[here](https://github.com/neovim/neovim/pull/737#issuecomment-43941520), it's
not possible to fully reset nvim to it's initial state, but the `BeforeEachTest`
function should be enough for most test cases. Tests requiring a fully clean
nvim instance should take care of starting/stopping nvim.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Define specialized arrays for each remote object type
- Implement msgpack_rpc functions for dealing with the new types
- Refactor all functions dealing with buffers, windows and tabpages to
return/accept handles instead of list indexes.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- Add macros supporting typed arrays in the remote API
- Refactor StringArray-related functions on top of the new macros
|
| | |
| | |
| | |
| | |
| | | |
- Extract remote types definitions into a macro
- Extract msgpack_rpc helper functions for remote types into a macro
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add the 'handle' field to `tabpage_T`
- Add declare/implement functions for registering/unregistering/retrieving
tabpages
- Register/unregister tabpages when they are created/destroyed.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add the 'handle' field to `win_T`
- Add declare/implement functions for registering/unregistering/retrieving
windows
- Register/unregister windows when they are created/destroyed.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add the 'handle' field to `buf_T`
- Add declare/implement functions for registering/unregistering/retrieving
buffers
- Register/unregister buffers when they are created/destroyed.
|
| | |
| | |
| | |
| | |
| | | |
This module will be used to implement remote management of objects through the
API. Object types to be registered must have a `uint64_t` field named 'handle'.
|
| | | |
|
| | |
| | |
| | |
| | | |
Also check that the string length is not equal or greater than MAXPATHL.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While the mb_string2cells function accepts a length parameter, it only seems to
work properly with 0-terminated strings, since valgrind reports a conditional
jump that depends on uninitialized values(means it reads after the string
boundaries which could result in overflows or wrong results)
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \ |
|
| |/ |
|
|\ \
| |/
|/|
| | |
- replace alloc with xmalloc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Replace a vim_strsave/free pair with xrealloc
- Use xmallocz() in some places
- Use xrealloc() and forget about the NULL pointer case
- Remove invalid comment
- Remove unnecessary checks
- Replace a complicated xmalloc/STRCPY/free code chunk code with xrealloc()
- Replace a vim_strsave/free code chunk with xrealloc()
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
put_on_cmdline() doesn't FAIL anymore but its return value was
never checked.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|