patch 7.4.1129

Problem:    Python None value can't be converted to a Vim value.
Solution:   Just use zero. (Damien)
This commit is contained in:
Bram Moolenaar
2016-01-17 22:37:03 +01:00
parent 85084ef1e9
commit 77324fc9d3
6 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -5521,7 +5521,7 @@ run_eval(const char *cmd, typval_T *rettv
}
else
{
if (ConvertFromPyObject(run_ret, rettv) == -1)
if (run_ret != Py_None && ConvertFromPyObject(run_ret, rettv) == -1)
EMSG(_("E859: Failed to convert returned python object to vim value"));
Py_DECREF(run_ret);
}
+2
View File
@@ -329,6 +329,8 @@ EOF
:$put =string(l)
:let d=pyeval('{"a": "b", "c": 1, "d": ["e"]}')
:$put =sort(items(d))
:let v:errmsg = ''
:$put ='pyeval(\"None\") = ' . pyeval('None') . v:errmsg
:if has('float')
: let f=pyeval('0.0')
: $put =string(f)
+1
View File
@@ -86,6 +86,7 @@ ll:[1]
['a', 'b']
['c', 1]
['d', ['e']]
pyeval("None") = 0
0.0
"\0": Vim(let):E859:
{"\0": 1}: Vim(let):E859:
+2
View File
@@ -326,6 +326,8 @@ EOF
:$put =string(l)
:let d=py3eval('{"a": "b", "c": 1, "d": ["e"]}')
:$put =sort(items(d))
:let v:errmsg = ''
:$put ='py3eval(\"None\") = ' . py3eval('None') . v:errmsg
:if has('float')
: let f=py3eval('0.0')
: $put =string(f)
+1
View File
@@ -86,6 +86,7 @@ ll:[1]
['a', 'b']
['c', 1]
['d', ['e']]
py3eval("None") = 0
0.0
"\0": Vim(let):E859:
{"\0": 1}: Vim(let):E859:
+2
View File
@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1129,
/**/
1128,
/**/