summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-09-05 18:54:48 +0200
committerBram Moolenaar <Bram@vim.org>2012-09-05 18:54:48 +0200
commit77fceb890851e8c97c9d4bbe521dff165455d371 (patch)
treee5f5d88afd7d31aa822a4bd7436ee8feae8df874
parente48a2dd3af920d712305e4225454cb2940fb3312 (diff)
updated for version 7.3.656v7.3.656
Problem: Internal error in :pyeval. Solution: Handle failed object conversion. (ZyX)
-rw-r--r--src/if_python.c8
-rw-r--r--src/if_python3.c4
-rw-r--r--src/version.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/src/if_python.c b/src/if_python.c
index 1740979ac7..836bf1b3f1 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -1025,8 +1025,8 @@ static int CurrentSetattr(PyObject *, char *, PyObject *);
static PySequenceMethods BufferAsSeq = {
(PyInquiry) BufferLength, /* sq_length, len(x) */
- (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */
- (PyIntArgFunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */
+ (binaryfunc) 0, /* BufferConcat, sq_concat, x+y */
+ (PyIntArgFunc) 0, /* BufferRepeat, sq_repeat, x*n */
(PyIntArgFunc) BufferItem, /* sq_item, x[i] */
(PyIntIntArgFunc) BufferSlice, /* sq_slice, x[i:j] */
(PyIntObjArgProc) BufferAssItem, /* sq_ass_item, x[i]=v */
@@ -1787,6 +1787,10 @@ do_pyeval (char_u *str, typval_T *rettv)
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
+ case VAR_UNKNOWN:
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = 0;
+ break;
}
}
diff --git a/src/if_python3.c b/src/if_python3.c
index a62971e886..57257e643e 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -1817,6 +1817,10 @@ do_py3eval (char_u *str, typval_T *rettv)
case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
case VAR_FUNC: func_ref(rettv->vval.v_string); break;
+ case VAR_UNKNOWN:
+ rettv->v_type = VAR_NUMBER;
+ rettv->vval.v_number = 0;
+ break;
}
}
diff --git a/src/version.c b/src/version.c
index 9deec1739c..0124df521b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -720,6 +720,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 656,
+/**/
655,
/**/
654,