]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.656 v7.3.656
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Sep 2012 16:54:48 +0000 (18:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Sep 2012 16:54:48 +0000 (18:54 +0200)
Problem:    Internal error in :pyeval.
Solution:   Handle failed object conversion. (ZyX)

src/if_python.c
src/if_python3.c
src/version.c

index 1740979ac748918a1bf512c69b65a6dcb055c8bb..836bf1b3f19fb7c138e7542932b0f55427d408d8 100644 (file)
@@ -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;
     }
 }
 
index a62971e886e4efc0e66e34b407a1fbbc09218329..57257e643ef2453b0b5aba03b62353aff36aaf0d 100644 (file)
@@ -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;
     }
 }
 
index 9deec1739cae5ea4b8daa1e6eb20c26f366b6389..0124df521b3b33ab40cefe1d092143eff5ab6192 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    656,
 /**/
     655,
 /**/