aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/encode.c
Commit message (Collapse)AuthorAge
...
* 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.
* eval/encode: Make sure that encoder can encode NULL variablesZyX2016-04-18
| | | | | | | | | Adds two undocumented v: variables: _null_list and _null_dict because I do not know a reproducible way to get such lists (though I think I heard about this) and dictionaries (do not remember hearing about them). NULL strings are obtained using $XXX_UNEXISTENT_VAR_XXX. Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked fine before this commit.
* eval/encode: Adjust buffer sizes passed to vim_snprintfZyX2016-04-18
|
* eval/encode: Dump FF character correctlyZyX2016-04-18
|
* encode: Fail to dump NaN and infinityZyX2016-04-18
| | | | Thanks to vim/vim#654
* eval: Rename json* functions to json_*ZyX2016-04-18
|
* eval/encode: Remove unneeded variable, add missing includeZyX2016-04-18
|
* eval/encode: Free memory just in caseZyX2016-04-18
| | | | After string_convert() with .vc_fail=true these blocks should never be entered because they indicate invalid unicode.
* eval/encode: Reduce length of encode_list_writeZyX2016-04-18
| | | Changes suggested by oni-link.
* eval/encode: Fix invalid UTF-8 strings handling:ZyX2016-04-18
| | | | 1. Do not allow reading past buffer end when creating error messages. 2. Fix surrogate pairs range, avoid magic constants.
* eval/encode: Fix writing strings starting with NL to listZyX2016-04-18
| | | | | | Error [found][1] by oni-link. [1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
* eval: Fix QuickBuild failuresZyX2016-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler used by one VM in QuickBuild has found a number of false positives. Everything is fine on travis. List of failures: From [QuickBuild][1], build [7429][2]: 14:38:19,945 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘assert_bool’: 14:38:19,945 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:7551:40: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] 14:38:20,058 WARN - cc1: all warnings being treated as errors . This is not making much sense (7551:40 is `!=` in `{SpecialVarValue} != ({bool}?{SpecialVarValue}:{SpecialVarValue})`), but this error is present. --- Also fail from [build][3] [4930][4]: 15:47:00,853 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval/encode.c: In function ‘encode_read_from_list’: 15:47:00,853 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval/encode.c:258:30: error: conversion to ‘char’ from ‘int’ may alter its value [-Werror=conversion] , pointing to `:` in `{char} = ({char} == {const} ? {const} : {char})` where `{const}` is character constant like `'\n'`. I have no idea where exactly it saw conversion, so simply casted everything to (char). --- [Build][5] error: 08:32:03,472 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘tv_equal’: 08:32:03,472 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:5077:1: error: control reaches end of non-void function [-Werror=return-type] --- Build [4949][7]: 11:28:00,578 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_type’: 11:28:00,578 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:16085:24: error: ‘n’ may be used uninitialized in this function [-Werror=uninitialized] 11:28:00,581 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_empty’: 11:28:00,581 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:8505:24: error: ‘n’ may be used uninitialized in this function [-Werror=uninitialized] [1]: http://neovim-qb.szakmeister.net/wicket/page?5-1.ILinkListener-content-buildTab-panel-masterStep-body-children-0-step-body-children-2-body-children-3-step-body-children-0-step-body-children-0-step-head-logLink [2]: http://neovim-qb.szakmeister.net/build/4929 [3]: http://neovim-qb.szakmeister.net/build/4930 [4]: http://neovim-qb.szakmeister.net/wicket/page?1-1.ILinkListener-content-buildTab-panel-masterStep-body-children-0-step-body-children-1-body-children-3-step-body-children-0-step-body-children-0-step-head-logLink [5]: http://neovim-qb.szakmeister.net/build/4948/step_status [7]: http://neovim-qb.szakmeister.net/build/4949
* eval/encode: Fix non-utf-8 &encoding handling, add testsZyX2016-04-18
|
* *: Fix memory leaks found by clang sanitizerZyX2016-04-18
|
* *: Fix gcc warningsZyX2016-04-18
|
* eval: Remove v:noneZyX2016-04-18
| | | | | To get v:none back just rever this commit. This will not make json*() functions compatible with Vim though.
* eval/decode: Add support for special mapsZyX2016-04-18
| | | | | | | Special dictionaries representing map are created when encountering duplicate key or when key is empty or contains NUL. Also checks that values are separated by a comma/colon properly.
* eval/*: Fix some linter errorsZyX2016-04-18
|
* eval/decode: Fix surrogate pairs processingZyX2016-04-18
|
* eval: Move some decoding functions to eval/decode.cZyX2016-04-18
|