ZyX
e814695223
eval/*code,shada: Drop support for converting UTF-8 from/to p_enc
...
Not needed any longer since p_enc is always utf-8.
2017-04-08 19:20:41 +03:00
ZyX
6006cb74ef
eval/decode: Omit calling convert_setup for each string
...
Uses the same trick eval/encode does.
2017-04-08 19:00:05 +03:00
ZyX
e586047a53
eval/decode,shada: Do not forget to clean up converters
2017-04-08 19:00:04 +03:00
ZyX
043d8ff9f2
Merge branch 'master' into luaviml'/lua
2017-04-08 01:54:58 +03:00
James McCoy
f4a3a96b68
Add handling for MSGPACK_OBJECT_FLOAT{32,64}
...
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.
2017-03-30 21:35:36 -04:00
ZyX
e18a578308
*: Move some dictionary functions to typval.h and use char*
...
Also fixes buffer reusage in setmatches() and complete().
2017-03-29 10:07:42 +03:00
ZyX
fb146e80aa
eval: Split eval.c into smaller files
2017-03-29 10:05:06 +03:00
ZyX
45feaa73d0
eval/decode: Fix memory leak in JSON functions
2017-03-27 00:12:22 +03:00
ZyX
f551df17f3
viml/executor: Directly generate typval_T values
...
Note: this will *still* crash when using API in cases similar to the one
described in first commit. Just it needs different code to reproduce.
2017-03-27 00:11:24 +03:00
ZyX
d007c2977b
lib/kvec: Do not use kv_init unless needed
2016-05-30 21:19:52 +03:00
ZyX
8cfb272c74
lib/kvec: Remove useless type argument from kv_push macros
2016-05-30 21:14:39 +03:00
ZyX
494b1c9bee
*: Make set_vim_var_\* functions have proper argument types
2016-04-18 02:48:20 +03:00
ZyX
c129f6cfaf
eval/decode: Accept \r
as space character
2016-04-18 02:48:20 +03:00
ZyX
d06c2a1b18
eval/decode: Do not overflow when parsing -
...
Also makes if’s less nested.
2016-04-18 02:48:20 +03:00
ZyX
2b0d46195b
eval/decode: Clarify meaning of some pointer arguments
2016-04-18 02:48:20 +03:00
ZyX
0c598774d8
eval/decode: Fix typo in internal error message
2016-04-18 02:48:20 +03:00
ZyX
515fea1ef0
eval/decode: Reject even more numbers
...
Rejects leading zeroes and numbers like 1.e+5 (decimal dot with missing number
with signed exponent).
2016-04-18 02:48:20 +03:00
ZyX
69ce17878e
*: Fix linter errors
2016-04-18 02:48:20 +03:00
ZyX
9a56fcb2e8
eval/decode: Rewrite json_decode_string end as suggested by oni-link
2016-04-18 02:48:20 +03:00
ZyX
9c543f2e24
eval/decode: Reject more numbers, accept 1e5
2016-04-18 02:48:20 +03:00
ZyX
032ac502ff
eval/decode: Do not loose high surrogates followed by high surrogates
2016-04-18 02:48:20 +03:00
ZyX
eb806c9620
eval/decode: Make sure that error messages do not cause overflow
2016-04-18 02:48:20 +03:00
ZyX
52c6cc2189
eval/decode: Make sure that parsing strings does not overflow
2016-04-18 02:48:20 +03:00
ZyX
224d7df630
eval/decode: Make sure that blank input does not crash Neovim
2016-04-18 02:48:20 +03:00
ZyX
394830631f
eval/decode: Make sure that U+00C3 is parsed correctly
2016-04-18 02:48:20 +03:00
ZyX
4eb5d05f01
eval/decode: Avoid overflow when parsing incomplete null/true/false
...
Note: second test does not crash or produce asan errors, even though it should.
2016-04-18 02:48:20 +03:00
ZyX
4a29995fe7
eval/decode: Rename brackets in error messages
...
U+007D is officially RIGHT CURLY BRACKET.
U+005D is officially RIGHT SQUARE BRACKET.
2016-04-18 02:48:20 +03:00
ZyX
1fc84ae2cd
eval/decode: Record that obj
may be freed
2016-04-18 02:48:20 +03:00
ZyX
4ff5d6e41c
eval/decode: Also use VAR_UNLOCKED in old code
2016-04-18 02:48:20 +03:00
ZyX
942e0b338c
encode: Handle incomplete surrogates like \uSURR\uOTHR
properly
2016-04-18 02:48:20 +03:00
ZyX
7124329bd9
*: Fix memory leaks found by clang sanitizer
2016-04-18 02:46:34 +03:00
ZyX
c91c0171dd
*: Fix gcc warnings
2016-04-18 02:45:49 +03:00
ZyX
f4ea114c67
eval/decode: Fix vim_str2nr invocation
2016-04-18 02:45:49 +03:00
ZyX
33778c36cc
*: Fix linter errors
2016-04-18 02:45:49 +03:00
ZyX
a3b87fc19b
eval: Remove get_vim_var_tv function
2016-04-18 02:45:49 +03:00
ZyX
e303ea8a19
eval/decode: Add support for special maps
...
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.
2016-04-18 02:45:49 +03:00
ZyX
2c378fdfaf
eval/decode: Parse strings with NUL to special dictionaries
2016-04-18 02:45:49 +03:00
ZyX
634e51d12b
eval/*: Fix some linter errors
2016-04-18 02:45:49 +03:00
ZyX
5814e29cdb
eval/decode: Fix surrogate pairs processing
2016-04-18 02:45:49 +03:00
ZyX
ea82270d30
eval/decode: Fail on control and invalid unicode characters
2016-04-18 02:45:49 +03:00
ZyX
cddd7d47c3
eval/decode: Make msgpackparse() function use new v: vars
2016-04-18 02:45:49 +03:00
ZyX
ed6756563c
eval/decode: Replace INIT_SPECIAL_DICT macros with inline function
2016-04-18 02:45:49 +03:00
ZyX
700b32a2b3
eval: Move some decoding functions to eval/decode.c
2016-04-18 02:45:49 +03:00