Merge remote-tracking branch 'vim/master'

This commit is contained in:
Kazuki Sakamoto
2016-04-15 21:19:18 -07:00
6 changed files with 55 additions and 7 deletions
+7
View File
@@ -40,6 +40,13 @@ Which one you need depends on the system you want to run it on and whether you
want or must compile it yourself. Check http://www.vim.org/download.php for
an overview of currently available distributions.
Some popular places to get the latest Vim:
* Check out the git repository from [github](https://github.com/vim/vim).
* Get the source code as an [archive](https://github.com/vim/vim/releases).
* Get a Windows executable from the
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
## Compiling ##
+6
View File
@@ -36,6 +36,12 @@ Which one you need depends on the system you want to run it on and whether you
want or must compile it yourself. Check "http://www.vim.org/download.php" for
an overview of currently available distributions.
Some popular places to get the latest Vim:
* Check out the git repository from github: https://github.com/vim/vim.
* Get the source code as an archive: https://github.com/vim/vim/releases.
* Get a Windows executable from the vim-win32-installer repository:
https://github.com/vim/vim-win32-installer/releases.
COMPILING
+1
View File
@@ -844,6 +844,7 @@ I32 cur_val(IV iv, SV *sv)
else
rv = newBUFrv(newSV(0), curbuf);
sv_setsv(sv, rv);
SvREFCNT_dec(SvRV(rv));
return 0;
}
#endif /* !PROTO */
+10 -2
View File
@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
if (argc != 0)
{
argv = PyMem_New(typval_T, (size_t) argc);
if (argv == NULL)
{
PyErr_NoMemory();
dict_unref(selfdict);
list_unref(argslist);
return NULL;
}
curtv = argv;
for (li = argslist->lv_first; li != NULL; li = li->li_next)
copy_tv(&li->li_tv, curtv++);
@@ -6070,7 +6077,7 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
ConvertFromPySequence(PyObject *obj, typval_T *tv)
{
PyObject *lookup_dict;
int ret = 0;
int ret;
if (!(lookup_dict = PyDict_New()))
return -1;
@@ -6080,9 +6087,10 @@ ConvertFromPySequence(PyObject *obj, typval_T *tv)
tv->v_type = VAR_LIST;
tv->vval.v_list = (((ListObject *)(obj))->list);
++tv->vval.v_list->lv_refcount;
ret = 0;
}
else if (PyIter_Check(obj) || PySequence_Check(obj))
return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
ret = convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
else
{
PyErr_FORMAT(PyExc_TypeError,
+23 -5
View File
@@ -34,7 +34,7 @@ fu <SID>catch_peval(expr)
endtry
call assert_true(0, 'no exception for `perleval("'.a:expr.'")`')
return ''
endf
endfunc
function Test_perleval()
call assert_false(perleval('undef'))
@@ -73,7 +73,7 @@ function Test_perleval()
call assert_equal('*VIM', perleval('"*VIM"'))
call assert_true(perleval('\\0') =~ 'SCALAR(0x\x\+)')
endf
endfunc
function Test_perldo()
sp __TEST__
@@ -82,7 +82,7 @@ function Test_perldo()
1
call assert_false(search('\Cperl'))
bw!
endf
endfunc
function Test_VIM_package()
perl VIM::DoCommand('let l:var = "foo"')
@@ -91,7 +91,7 @@ function Test_VIM_package()
set noet
perl VIM::SetOption('et')
call assert_true(&et)
endf
endfunc
function Test_stdio()
redir =>l:out
@@ -102,4 +102,22 @@ function Test_stdio()
EOF
redir END
call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n"))
endf
endfunc
function Test_SvREFCNT()
new t
perl <<--perl
my ($b, $w);
$b = $curbuf for 0 .. 10;
$w = $curwin for 0 .. 10;
VIM::DoCommand('bw! t');
if (exists &Internals::SvREFCNT) {
my $cb = Internals::SvREFCNT($$b);
my $cw = Internals::SvREFCNT($$w);
VIM::Eval("assert_equal(2, $cb)");
VIM::Eval("assert_equal(2, $cw)");
}
VIM::Eval("assert_false($$b)");
VIM::Eval("assert_false($$w)");
--perl
endfunc
+8
View File
@@ -763,6 +763,14 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1747,
/**/
1746,
/**/
1745,
/**/
1744,
/**/
1743,
/**/