aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/decode.c
Commit message (Collapse)AuthorAge
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* refactor: rename types.h to types_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|
* fix(messages): use "Vimscript" instead of "VimL" #24111Justin M. Keyes2023-06-22
| | | | followup to #24109 fix #16150
* refactor: remove redundant const char * castsii142023-04-07
|
* vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)zeertzjq2023-03-05
| | | | | | | | Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes vim/vim#12103) https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(build): graduate msgpack-c FLOAT32 "feature" since foreverbfredl2023-03-03
|
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
* refactor: clint (#20600)Lewis Russell2022-10-12
|
* refactor: move klib out of src/nvim/ #20341dundargoc2022-09-25
| | | | It's confusing to mix vendored dependencies with neovim source code. A clean separation is simpler to keep track of and simpler to document.
* refactor: replace char_u with charDundar Göc2022-09-01
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: missing parenthesis may cause unexpected problems (#17443)kylo2522022-05-26
| | | related vim-8.2.{4402,4639}
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: fix indent in decode.c (#16543)zeertzjq2021-12-06
|
* lint (#16526)Jan Edmund Lazo2021-12-05
|
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: format #15702dundargoc2021-09-18
|
* feat(decode_string): decode binary string with NULs to BlobSean Dewar2021-09-15
| | | | | | | | Strings that previously decoded into a msgpack special for representing BINs with NULs now convert to Blobs. It shouldn't be possible to decode into this special anymore after this change? Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
* vim-patch:8.1.1355: obvious mistakes are accepted as valid expressionsSean Dewar2021-09-11
| | | | | | | | | Problem: Obvious mistakes are accepted as valid expressions. Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto, closes vim/vim#3981) https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685 Update vim_str2nr_spec.lua to add more tests that use strict = true.
* Use abort() instead of assert(false) for things that should never happenJames McCoy2021-01-31
| | | | | | | | assert() is compiled out for release builds, but we don't want to continue running in these impossible situations. This also resolves the "implicit fallthrough" warnings for the asserts in switch cases.
* robustness: avoid adding offset to NULL pointerBjörn Linse2020-09-04
| | | | | | | | | | | UBSAN with clang 10.0 is checking for adding offsets to a `NULL` pointer which is not allowed. This is not yet checked in the version of clang used in CI (7.0.0). I will work on cases of this so that tests passes locally for me. This could be tested in CI by either upgrading the clang of the ASAN/UBSAN to 10.0, or add yet another CI target which builds with clang 10.0.
* vim-patch:8.2.0111: VAR_SPECIAL is also used for booleansBilly Su2020-06-06
| | | | | | Problem: VAR_SPECIAL is also used for booleans. Solution: Add VAR_BOOL for better type checking. https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
* build: -Wmissing-prototypesJustin M. Keyes2019-02-04
| | | | | | | ref #343 Though I don't see a strong benefit, it isn't too much of a burden, and maybe avoids confusion in some cases.
* eval/decode: Silence PVS/V547: code written for 32-bit integersZyX2018-04-09
|
* Merge #7806 from ZyX-I/list-statJustin M. Keyes2018-01-15
|\ | | | | Add a way to collect list usage statistics
| * *: Provide list length when allocating listsZyX2018-01-14
| |
* | coverity/169163: decode_string: Null pointer derefJustin M. Keyes2018-01-11
|/ | | | | | | | | | | | | | | | | | | *** CID 169163: Null pointer dereferences (FORWARD_NULL) /src/nvim/eval/decode.c: 290 in decode_string() 284 if (elw_ret == -1) { 285 tv_clear(&tv); 286 return (typval_T) { .v_type = VAR_UNKNOWN, .v_lock = VAR_UNLOCKED }; 287 } 288 return tv; 289 } else { >>> CID 169163: Null pointer dereferences (FORWARD_NULL) >>> Passing null pointer "s" to "xmemdupz", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) 290 return (typval_T) { 291 .v_type = VAR_STRING, 292 .v_lock = VAR_UNLOCKED, 293 .vval = { .v_string = (char_u *)( 294 s_allocated ? (char *)s : xmemdupz(s, len)) }, 295 };
* *: Remove most calls to tv_list_item_allocZyX2017-12-24
| | | | 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.
* *: Fix linter errorsZyX2017-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/decode.c: Avoid NULL arg to memchr() #7332Adrian Neumann2017-11-06
| | | | | | | Clang complains because memchr has undefined behavior if the ptr is NULL, even if len==0. Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
* lintJames McCoy2017-06-04
|
* 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
* Merge branch 'master' into luaviml'/luaZyX2017-05-08
|\
| * *: Add comment to all C filesZyX2017-04-19
| |
* | Merge branch 'master' into luaviml'/luaZyX2017-04-10
|\|
| * *: Remove useless assertsZyX2017-04-08
| |
| * *: Fix linter errorsZyX2017-04-08
| | | | | | | | | | | | Drops comments `// for …` that do not pass linter for them being unmaintainable and fast to becoming incomplete or even incorrect. Mention @dedmass
| * eval/*code,shada: Drop support for converting UTF-8 from/to p_encZyX2017-04-08
| | | | | | | | Not needed any longer since p_enc is always utf-8.
| * eval/decode: Omit calling convert_setup for each stringZyX2017-04-08
| | | | | | Uses the same trick eval/encode does.
| * eval/decode,shada: Do not forget to clean up convertersZyX2017-04-08
| |
* | Merge branch 'master' into luaviml'/luaZyX2017-04-08
|\|
| * Add handling for MSGPACK_OBJECT_FLOAT{32,64}James McCoy2017-03-30
| | | | | | | | | | | | msgpack-c previously only had MSGPACK_OBJECT_FLOAT, which was a 64-bit value. Now, 32-bit and 64-bit floats are supported as distinct types, but we'll simply continue to treat everything as 64-bit types.
| * *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | | | | | Also fixes buffer reusage in setmatches() and complete().