aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/encode.c
Commit message (Collapse)AuthorAge
* 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.
* gcc/analyzer: fix false positives for NULL (#13248)Jan Edmund Lazo2020-11-08
| | | Close https://github.com/neovim/neovim/issues/13158
* 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
* doc: fix typos [ci skip] #11787Hye Sung Jung2020-01-30
|
* build: Fix -Wconversion warnings for fpclassify et alJustin M. Keyes2019-01-21
| | | | | | | | | | | | closes #8274 The parent commit tries a different approach, but that fails on Apple Clang version: Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin17.7.0 which somehow compiles the check_c_source_compiles() check, but then complains during later compilation that __fpclassify is not defined (regardless of "#include <math.h>").
* build: Fix -Wconversion warnings for fpclassify et alJustin M. Keyes2019-01-20
| | | | | | | | | | | | closes #8274 - Instead of #undef and re-#define, define "xfoo" wrappers to avoid include-order sensitivity. - The warnings are bogus, caused by bad interaction between glibc and clang 6+. - https://bugs.llvm.org/show_bug.cgi?id=35268 - https://bugs.llvm.org/show_bug.cgi?id=39738 - https://bugzilla.redhat.com/show_bug.cgi?id=1472437
* build: enable -WshadowJustin M. Keyes2019-01-02
| | | | | | | | | | Note about shada.c: - shada_read_next_item_start was intentionally shadowing `unpacked` and `i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly depended on those variable names. - Macros were changed to parameterize `unpacked` (but not `i`). Macros like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other approach is messy.
* Remove extraneous parens to silence -Wparentheses-equalityJames McCoy2018-11-24
| | | | | | | In file included from ../src/nvim/eval/encode.c:974: ../src/nvim/eval/typval_encode.c.h:390:40: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] do { if ((tv->vval.v_special == kSpecialVarTrue)) { msgpack_pack_true(packer); } else { msgpack_pack_false(packer); } } while (0); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
* add func_attr_printf in :MichaHoffmann2018-09-24
| | | | | | | | | | | | | | | | | | | | | | log.c message.c strings.c fixed some printf warnings in: src/nvim/undo.c src/nvim/eval.c src/nvim/eval/encode.c src/nvim/eval/typval.c src/nvim/ex_getln.c src/nvim/fileio.c src/nvim/lua/executor.c src/nvim/main.c src/nvim/regexp_nfa.c src/nvim/shada.c src/nvim/spellfile.c src/nvim/tui/terminfo.c src/nvim/garray.h
* Merge #7863 'mingw64: fix gcc warnings'Justin M. Keyes2018-01-20
|\
| * Fix warning about math functions, include isnan, isinf, fpclassify.George Zhao2018-01-18
|/
* Merge branch 'master' into hide-container-implZyX2017-12-16
|\
| * vim-patch:8.0.0074Michael Schupikov2017-12-15
| | | | | | | | | | | | | | | | | | | | Problem: Cannot make Vim fail on an internal error. Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an internal error without mentioning where. https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f Signed-off-by: Michael Schupikov <michael@schupikov.de>
* | eval/encode: Avoid unnecessary tv_list_idx_of_item() callsZyX2017-12-16
| |
* | *: Fix some problems found during reviewZyX2017-12-15
| | | | | | | | Still missing: problems in window.c, it should be possible to construct a test for them.
* | *: Fix linter errorsZyX2017-12-11
| |
* | *: Fix test failuresZyX2017-12-11
| |
* | eval/encode: Fix crash in json_encode test suiteZyX2017-12-10
| |
* | *: Hide list implementation in other files as wellZyX2017-12-10
|/
* eval/encode: Silence V595 errorZyX2017-05-20
|
* Merge branch 'master' into lazier-arg_errmsg-gettextZyX2017-04-21
|\
| * *: Add comment to all C filesZyX2017-04-19
| |
* | eval/encode: Do translate “… argument” strings, but only in conv_errorZyX2017-04-15
|/
* *: Remove useless assertsZyX2017-04-08
|
* 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.
* *: 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
|
* eval: Fix failing testZyX2017-01-07
|
* eval: Make sure that copyID is reset when neededZyX2017-01-07
| | | | | Works by making value pushed on stack represent the exhausted list. Fixes #5901, except for dictionaries which need similar adjustment.
* eval/typval_encode: Use TYPVAL_ENCODE_CONV_EMPTY_DICT for partialsZyX2017-01-06
|
* *: Remove `// fname()` comments near typval_encode includesZyX2017-01-04
|
* eval/encode: Always check the return value of encode_vim_to_\*ZyX2017-01-04
|
* eval/encode: Fail when stringifying NULL functionsZyX2017-01-03
|
* eval/encode: Fix 4 new linter failuresZyX2017-01-03
|
* eval/typval_encode: Refactor arguments to argument macrosesZyX2017-01-03
| | | Fixed local test failures somewhere in process.
* eval/typval_encode: Refactor big-big macros into .c.h fileZyX2017-01-03
| | | | | This makes gdb backtraces much more meaningful: specifically I now know at which line it crashes in place of seeing that it crashes at TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS macros invocation.
* eval/typval_encode: Make partial conversions not recursiveZyX2017-01-03
| | | | | | Is known to crash in the current state. Ref #5825.
* eval: encode: Fix NULL check for partial's nameJames McCoy2016-12-23
|
* Add some tests and cleanup.Michael Ennen2016-12-12
|
* Fixes.Michael Ennen2016-12-12
|
* vim-patch:7.4.1608Michael Ennen2016-12-12
| | | | | | | Problem: string() doesn't handle a partial. Solution: Make a string from a partial. https://github.com/vim/vim/commit/5c29154b521e9948190be653cfda666ecbb63b5b
* vim-patch:7.4.1559Michael Ennen2016-12-12
| | | | | | | Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial. https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710
* Merge #5752 from justinmk/docJustin M. Keyes2016-12-11
|\ | | | | doc: api_info(), typval_encode.h
| * doc: eval/typval_encode.hJustin M. Keyes2016-10-31
| | | | | | | | Annotate TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS to aid code navigation.
* | Bump all nvim-specific error codes above E5000James McCoy2016-11-15
|/ | | | | | | | | | In order to not conflict with new error codes that Vim adds, all Neovim error codes should be above 5000. The three existing sub-5000 error codes (E926, E951, and E952) are now E50003, E5004, and E5005 respectively. E953 was removed in 6167ce6df2753d5474ad49aea19f5957128ab015, so just remove it from the help.
* eval: Also make clear_tv non-recursiveZyX2016-06-24
|
* api/helpers: Use typval_encode.h for vim_to_objectZyX2016-06-24
| | | | | | | | | | | | | This ought to prevent stack overflow, but I do not see this actually working: *lua* code crashes with stack overflow when trying to deserialize msgpack from Neovim, Neovim is fine even if nesting level is increased 100x (though test becomes very slow); not sure how recursive function may survive this. So it looks like there are currently only two positive effects: 1. NULL lists are returned as empty (#4596). 2. Functional tests are slightly more fast. Very slightly. Checked for Release build for test/functional/eval tests because benchmarking of debug mode is not very useful.
* eval/encode: Move main macros from encode.c to typval_encode.hZyX2016-05-30
|
* lib/kvec: Remove useless type argument from kv_push macrosZyX2016-05-30
|
* eval/encode: Simplify loop in encode_list_writeZyX2016-04-18
| | | Patch made up by oni-link.