MichaHoffmann
affef0aab8
add func_attr_printf in :
...
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
2018-09-24 21:28:04 +02:00
Justin M. Keyes
0daaa49586
Merge #7863 'mingw64: fix gcc warnings'
2018-01-20 17:18:32 +01:00
George Zhao
43833af53c
Fix warning about math functions, include isnan, isinf, fpclassify.
2018-01-18 21:43:44 +08:00
ZyX
7f3b9a4acc
Merge branch 'master' into hide-container-impl
2017-12-16 14:27:41 +03:00
ZyX
91d3efa35a
eval/encode: Avoid unnecessary tv_list_idx_of_item() calls
2017-12-16 01:48:20 +03:00
Michael Schupikov
d5bce42b52
vim-patch:8.0.0074
...
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
95f096030e
Signed-off-by: Michael Schupikov <michael@schupikov.de >
2017-12-15 15:50:58 -05:00
ZyX
c8a5d6181b
*: Fix some problems found during review
...
Still missing: problems in window.c, it should be possible to construct a test
for them.
2017-12-15 02:39:46 +03:00
ZyX
f4132fb38b
*: Fix linter errors
2017-12-11 10:19:20 +03:00
ZyX
ceb45a0885
*: Fix test failures
2017-12-11 01:43:36 +03:00
ZyX
7572d5ac5a
eval/encode: Fix crash in json_encode test suite
2017-12-10 22:41:00 +03:00
ZyX
ac4bbf55f6
*: Hide list implementation in other files as well
2017-12-10 22:04:43 +03:00
ZyX
1db29cb5e5
eval/encode: Silence V595 error
2017-05-20 03:47:01 +03:00
ZyX
d463c9e03a
Merge branch 'master' into lazier-arg_errmsg-gettext
2017-04-21 00:33:12 +03:00
ZyX
c2f3e361c5
*: Add comment to all C files
2017-04-19 19:11:50 +03:00
ZyX
c289986c89
eval/encode: Do translate “… argument” strings, but only in conv_error
2017-04-15 00:08:50 +03:00
ZyX
7701014b65
*: Remove useless asserts
2017-04-08 20:22:46 +03:00
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
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
9a09ffa883
eval: Fix failing test
2017-01-07 15:54:55 +03:00
ZyX
a970c1a957
eval: Make sure that copyID is reset when needed
...
Works by making value pushed on stack represent the exhausted list.
Fixes #5901 , except for dictionaries which need similar adjustment.
2017-01-07 15:15:14 +03:00
ZyX
6584fb723a
eval/typval_encode: Use TYPVAL_ENCODE_CONV_EMPTY_DICT for partials
2017-01-06 22:48:50 +03:00
ZyX
c93ce07628
*: Remove // fname()
comments near typval_encode includes
2017-01-04 19:04:15 +03:00
ZyX
358097ac5f
eval/encode: Always check the return value of encode_vim_to_\*
2017-01-04 19:02:39 +03:00
ZyX
f21725946c
eval/encode: Fail when stringifying NULL functions
2017-01-03 16:13:21 +03:00
ZyX
a52238707c
eval/encode: Fix 4 new linter failures
2017-01-03 06:39:23 +03:00
ZyX
ff8944105d
eval/typval_encode: Refactor arguments to argument macroses
...
Fixed local test failures somewhere in process.
2017-01-03 06:39:23 +03:00
ZyX
b3163d06b3
eval/typval_encode: Refactor big-big macros into .c.h file
...
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.
2017-01-03 06:39:23 +03:00
ZyX
c5c75513b8
eval/typval_encode: Make partial conversions not recursive
...
Is known to crash in the current state.
Ref #5825 .
2017-01-03 06:39:23 +03:00
James McCoy
a083c85ae4
eval: encode: Fix NULL check for partial's name
2016-12-23 22:35:18 -05:00
Michael Ennen
5e4eb18eb0
Add some tests and cleanup.
2016-12-12 10:17:35 -05:00
Michael Ennen
a21c687661
Fixes.
2016-12-12 10:17:35 -05:00
Michael Ennen
bae31b764a
vim-patch:7.4.1608
...
Problem: string() doesn't handle a partial.
Solution: Make a string from a partial.
5c29154b52
2016-12-12 10:17:35 -05:00
Michael Ennen
521e45f2a8
vim-patch:7.4.1559
...
Problem: Passing cookie to a callback is clumsy.
Solution: Change function() to take arguments and return a partial.
1735bc988c
2016-12-12 10:17:34 -05:00
Justin M. Keyes
29e651515f
Merge #5752 from justinmk/doc
...
doc: api_info(), typval_encode.h
2016-12-11 02:04:33 +01:00
James McCoy
c0fd830be4
Bump all nvim-specific error codes above E5000
...
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 6167ce6df2
, so just
remove it from the help.
2016-11-15 23:16:08 -05:00
Justin M. Keyes
b172f9904f
doc: eval/typval_encode.h
...
Annotate TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS to aid code navigation.
2016-10-31 02:21:16 +01:00
ZyX
f2f9ab6f35
eval: Also make clear_tv non-recursive
2016-06-24 16:53:26 +03:00
ZyX
da15b5c1f3
api/helpers: Use typval_encode.h for vim_to_object
...
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.
2016-06-24 16:53:26 +03:00
ZyX
139c1bb48b
eval/encode: Move main macros from encode.c to typval_encode.h
2016-05-30 23:31:17 +03:00
ZyX
8cfb272c74
lib/kvec: Remove useless type argument from kv_push macros
2016-05-30 21:14:39 +03:00
ZyX
45304b482c
eval/encode: Simplify loop in encode_list_write
...
Patch made up by oni-link.
2016-04-18 02:48:20 +03:00
ZyX
bda0165514
eval/encode: Make sure that encoder can encode NULL variables
...
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.
2016-04-18 02:48:20 +03:00
ZyX
c4f1b5a938
eval/encode: Adjust buffer sizes passed to vim_snprintf
2016-04-18 02:48:20 +03:00
ZyX
fd92e648ac
eval/encode: Dump FF character correctly
2016-04-18 02:48:20 +03:00
ZyX
406562ac6d
encode: Fail to dump NaN and infinity
...
Thanks to vim/vim#654
2016-04-18 02:48:20 +03:00
ZyX
2f67786796
eval: Rename json* functions to json_*
2016-04-18 02:48:20 +03:00
ZyX
af6603a6b4
eval/encode: Remove unneeded variable, add missing include
2016-04-18 02:47:13 +03:00
ZyX
4913a25dec
eval/encode: Free memory just in case
...
After string_convert() with .vc_fail=true these blocks should never be entered
because they indicate invalid unicode.
2016-04-18 02:47:13 +03:00
ZyX
209427e972
eval/encode: Reduce length of encode_list_write
...
Changes suggested by oni-link.
2016-04-18 02:47:13 +03:00