Thiago de Arruda
0c764fb1a4
wstream: Change wstream_write failure behavior
...
Before this change, any write that could cause a WStream instance to use more
than `maxmem` would fail, which is not acceptable when writing big chunks of
data. (This could happen when returning contents from a big buffer through the
API, for example).
Writes of any size are now allowed, but before we check if the currently used
memory doesn't break the limit. This should be enough to prevent us from
stacking data when talking to a locked process.
2014-06-17 12:12:29 -03:00
Thiago de Arruda
063d8a5773
msgpack_rpc: Deal with deserialization failures
...
There seems to be no way to deal with failures when calling
`msgpack_unpacker_next`, so this reimplements that function as
`msgpack_rpc_unpack`, which has an additional result for detecting failures.
On top of that, we make use of the new function to properly return msgpack-rpc
errors when something bad happens.
2014-06-17 12:12:29 -03:00
Justin M. Keyes
d199d18159
Merge #787 'removal of redundant OOM error handling'
2014-06-16 20:27:25 -04:00
Felipe Oliveira Carvalho
e85598e5a9
Remove unnecessary comments and unnecessary return
2014-06-16 01:40:29 -03:00
Felipe Oliveira Carvalho
f099809e67
Refator return logic in ses_put_fname()
2014-06-16 01:40:29 -03:00
Felipe Oliveira Carvalho
238fa72884
No OOM for list_alloc()
2014-06-16 01:40:28 -03:00
Felipe Oliveira Carvalho
3cb3c20b74
Fix some "out of memory" comments and few cosmetics
2014-06-16 01:40:28 -03:00
Felipe Oliveira Carvalho
f4002c97dc
No OOM in ExpandOldSetting()
2014-06-16 01:40:28 -03:00
Felipe Oliveira Carvalho
b1595e74f2
No OOM in reverse_text()
2014-06-16 01:40:27 -03:00
Felipe Oliveira Carvalho
85100bb01d
No OOM in concat_str() (few remaining cases)
...
Also fixed the duplicated declaration (path.c and strings.c)
2014-06-16 01:40:27 -03:00
Felipe Oliveira Carvalho
3a9a76c996
No OOM in vim_strsave_escape_csi()
2014-06-16 01:36:32 -03:00
Felipe Oliveira Carvalho
a26a1697c7
No OOM in home_replace_save()
2014-06-16 01:36:32 -03:00
Felipe Oliveira Carvalho
cca66742eb
No OOM in vim_strsave_fnameescape()
2014-06-16 01:36:31 -03:00
Felipe Oliveira Carvalho
81ca5ff126
No OOM in enc_canonize()
...
Fix a `return FAIL` that should be `return NULL` in `enc_locale()`
2014-06-16 01:36:31 -03:00
Felipe Oliveira Carvalho
8234f2839f
No OOM in vim_strsave_escaped[_ext]()
2014-06-16 01:36:31 -03:00
Felipe Oliveira Carvalho
f7e64c3c5f
No OOM in vim_strnsave_up()
...
And some cleanup in strsave_up()
2014-06-16 01:36:30 -03:00
Felipe Oliveira Carvalho
d0fe14fdfe
No OOM in popup_mode_name()
2014-06-16 01:31:37 -03:00
Felipe Oliveira Carvalho
4667fbcbe7
au_get_grouparg() can't fail, remove error handling
2014-06-16 01:31:37 -03:00
Felipe Oliveira Carvalho
3d10e2e0cb
No OOM in msg_show_console_dialog()
2014-06-16 01:31:37 -03:00
Felipe Oliveira Carvalho
3b648b0a7b
do_map() won't return 4 (OOM) anymore
2014-06-16 01:31:37 -03:00
Felipe Oliveira Carvalho
0b849e775c
No OOM in ExpandGeneric()
2014-06-16 01:31:37 -03:00
Felipe Oliveira Carvalho
ab016d3dbd
No OOM in expand_shellcmd()
2014-06-16 01:31:36 -03:00
Felipe Oliveira Carvalho
9e7d06da41
No OOM in autoload_name()
2014-06-16 01:31:36 -03:00
Felipe Oliveira Carvalho
bb978fa69c
No OOM in save_cmdline_alloc()
2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
129db629dd
No OOM in list_insert_tv() and list_extend()
2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
dd57e64794
No OOM in listitem_alloc()
2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
2d092cc229
No OOM in dictitem_copy
2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
48fc1602be
No OOM in hash_may_resize() and hash_add_item()
...
hash_add() can still return FAIL if the key already exists.
2014-06-16 01:31:35 -03:00
Felipe Oliveira Carvalho
6f29364632
No OOM in dictitem_alloc()
2014-06-16 01:31:34 -03:00
Felipe Oliveira Carvalho
c3f88060db
No OOM in dict_alloc() and rettv_dict_alloc()
2014-06-16 01:31:34 -03:00
Justin M. Keyes
8bbeb4b480
Merge #743 'Replace vim_strncpy with strlcpy'
2014-06-13 18:09:08 -04:00
Douglas Schneider
d430f039d1
Replace vim_strncpy calls: message.c
2014-06-13 18:08:22 -04:00
Douglas Schneider
1e1750fdce
Replace vim_strncpy calls: eval.c
2014-06-13 18:08:22 -04:00
Douglas Schneider
004b45d6f5
Replace vim_strncpy calls: screen.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
03b25f782b
Replace vim_strncpy calls: ex_docmd.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
9f4e10b62e
Replace vim_strncpy calls: version.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
fe4a7fc7e7
Replace vim_strncpy calls: spell.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
bdf79dd619
Replace vim_strncpy calls: syntax.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
43f5a5ef65
Replace vim_strncpy calls: tag.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
1a1725765c
Replace vim_strncpy calls: buffer.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
a81f2dbe6e
Replace vim_strncpy calls: misc1.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
2a0784731d
Replace vim_strncpy calls: hardcopy.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
656408e479
Replace vim_strncpy calls: quickfix.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
4e81698988
Replace vim_strncpy calls: if_cscope.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
e554ea2036
Replace vim_strncpy calls: regexp.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
4517eb80be
Replace vim_strncpy calls: fold.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
a501d7a940
Replace vim_strncpy calls: ex_getln.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
9a1a2b9a59
Replace vim_strncpy calls: menu.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
30f5cd6c30
Replace vim_strncpy calls: option.c
2014-06-13 18:08:21 -04:00
Douglas Schneider
2179a03111
Replace vim_strncpy calls: path.c
2014-06-13 18:08:21 -04:00