Skip to content

Commit 60009f2

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents a5660a2 + fe4b186 commit 60009f2

6 files changed

Lines changed: 55 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Which one you need depends on the system you want to run it on and whether you
4040
want or must compile it yourself. Check http://www.vim.org/download.php for
4141
an overview of currently available distributions.
4242

43+
Some popular places to get the latest Vim:
44+
* Check out the git repository from [github](https://github.com/vim/vim).
45+
* Get the source code as an [archive](https://github.com/vim/vim/releases).
46+
* Get a Windows executable from the
47+
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
48+
49+
4350

4451
## Compiling ##
4552

README.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ Which one you need depends on the system you want to run it on and whether you
3636
want or must compile it yourself. Check "http://www.vim.org/download.php" for
3737
an overview of currently available distributions.
3838

39+
Some popular places to get the latest Vim:
40+
* Check out the git repository from github: https://github.com/vim/vim.
41+
* Get the source code as an archive: https://github.com/vim/vim/releases.
42+
* Get a Windows executable from the vim-win32-installer repository:
43+
https://github.com/vim/vim-win32-installer/releases.
44+
3945

4046
COMPILING
4147

src/if_perl.xs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ I32 cur_val(IV iv, SV *sv)
844844
else
845845
rv = newBUFrv(newSV(0), curbuf);
846846
sv_setsv(sv, rv);
847+
SvREFCNT_dec(SvRV(rv));
847848
return 0;
848849
}
849850
#endif /* !PROTO */

src/if_py_both.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,6 +2922,13 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
29222922
if (argc != 0)
29232923
{
29242924
argv = PyMem_New(typval_T, (size_t) argc);
2925+
if (argv == NULL)
2926+
{
2927+
PyErr_NoMemory();
2928+
dict_unref(selfdict);
2929+
list_unref(argslist);
2930+
return NULL;
2931+
}
29252932
curtv = argv;
29262933
for (li = argslist->lv_first; li != NULL; li = li->li_next)
29272934
copy_tv(&li->li_tv, curtv++);
@@ -6070,7 +6077,7 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
60706077
ConvertFromPySequence(PyObject *obj, typval_T *tv)
60716078
{
60726079
PyObject *lookup_dict;
6073-
int ret = 0;
6080+
int ret;
60746081

60756082
if (!(lookup_dict = PyDict_New()))
60766083
return -1;
@@ -6080,9 +6087,10 @@ ConvertFromPySequence(PyObject *obj, typval_T *tv)
60806087
tv->v_type = VAR_LIST;
60816088
tv->vval.v_list = (((ListObject *)(obj))->list);
60826089
++tv->vval.v_list->lv_refcount;
6090+
ret = 0;
60836091
}
60846092
else if (PyIter_Check(obj) || PySequence_Check(obj))
6085-
return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
6093+
ret = convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
60866094
else
60876095
{
60886096
PyErr_FORMAT(PyExc_TypeError,

src/testdir/test_perl.vim

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fu <SID>catch_peval(expr)
3434
endtry
3535
call assert_true(0, 'no exception for `perleval("'.a:expr.'")`')
3636
return ''
37-
endf
37+
endfunc
3838

3939
function Test_perleval()
4040
call assert_false(perleval('undef'))
@@ -73,7 +73,7 @@ function Test_perleval()
7373

7474
call assert_equal('*VIM', perleval('"*VIM"'))
7575
call assert_true(perleval('\\0') =~ 'SCALAR(0x\x\+)')
76-
endf
76+
endfunc
7777

7878
function Test_perldo()
7979
sp __TEST__
@@ -82,7 +82,7 @@ function Test_perldo()
8282
1
8383
call assert_false(search('\Cperl'))
8484
bw!
85-
endf
85+
endfunc
8686

8787
function Test_VIM_package()
8888
perl VIM::DoCommand('let l:var = "foo"')
@@ -91,7 +91,7 @@ function Test_VIM_package()
9191
set noet
9292
perl VIM::SetOption('et')
9393
call assert_true(&et)
94-
endf
94+
endfunc
9595

9696
function Test_stdio()
9797
redir =>l:out
@@ -102,4 +102,22 @@ function Test_stdio()
102102
EOF
103103
redir END
104104
call assert_equal(['&VIM::Msg', 'STDOUT', 'STDERR'], split(l:out, "\n"))
105-
endf
105+
endfunc
106+
107+
function Test_SvREFCNT()
108+
new t
109+
perl <<--perl
110+
my ($b, $w);
111+
$b = $curbuf for 0 .. 10;
112+
$w = $curwin for 0 .. 10;
113+
VIM::DoCommand('bw! t');
114+
if (exists &Internals::SvREFCNT) {
115+
my $cb = Internals::SvREFCNT($$b);
116+
my $cw = Internals::SvREFCNT($$w);
117+
VIM::Eval("assert_equal(2, $cb)");
118+
VIM::Eval("assert_equal(2, $cw)");
119+
}
120+
VIM::Eval("assert_false($$b)");
121+
VIM::Eval("assert_false($$w)");
122+
--perl
123+
endfunc

src/version.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,14 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
1747,
768+
/**/
769+
1746,
770+
/**/
771+
1745,
772+
/**/
773+
1744,
766774
/**/
767775
1743,
768776
/**/

0 commit comments

Comments
 (0)