comparison src/if_python.c @ 3796:a2f61b2b8e77 v7.3.656

updated for version 7.3.656 Problem: Internal error in :pyeval. Solution: Handle failed object conversion. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Sep 2012 18:54:48 +0200
parents 2d107086903a
children 3958b0e672d6
comparison
equal deleted inserted replaced
3795:3ca71275f364 3796:a2f61b2b8e77
1023 static PyObject *CurrentGetattr(PyObject *, char *); 1023 static PyObject *CurrentGetattr(PyObject *, char *);
1024 static int CurrentSetattr(PyObject *, char *, PyObject *); 1024 static int CurrentSetattr(PyObject *, char *, PyObject *);
1025 1025
1026 static PySequenceMethods BufferAsSeq = { 1026 static PySequenceMethods BufferAsSeq = {
1027 (PyInquiry) BufferLength, /* sq_length, len(x) */ 1027 (PyInquiry) BufferLength, /* sq_length, len(x) */
1028 (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */ 1028 (binaryfunc) 0, /* BufferConcat, sq_concat, x+y */
1029 (PyIntArgFunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */ 1029 (PyIntArgFunc) 0, /* BufferRepeat, sq_repeat, x*n */
1030 (PyIntArgFunc) BufferItem, /* sq_item, x[i] */ 1030 (PyIntArgFunc) BufferItem, /* sq_item, x[i] */
1031 (PyIntIntArgFunc) BufferSlice, /* sq_slice, x[i:j] */ 1031 (PyIntIntArgFunc) BufferSlice, /* sq_slice, x[i:j] */
1032 (PyIntObjArgProc) BufferAssItem, /* sq_ass_item, x[i]=v */ 1032 (PyIntObjArgProc) BufferAssItem, /* sq_ass_item, x[i]=v */
1033 (PyIntIntObjArgProc) BufferAssSlice, /* sq_ass_slice, x[i:j]=v */ 1033 (PyIntIntObjArgProc) BufferAssSlice, /* sq_ass_slice, x[i:j]=v */
1034 }; 1034 };
1785 switch(rettv->v_type) 1785 switch(rettv->v_type)
1786 { 1786 {
1787 case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break; 1787 case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
1788 case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break; 1788 case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
1789 case VAR_FUNC: func_ref(rettv->vval.v_string); break; 1789 case VAR_FUNC: func_ref(rettv->vval.v_string); break;
1790 case VAR_UNKNOWN:
1791 rettv->v_type = VAR_NUMBER;
1792 rettv->vval.v_number = 0;
1793 break;
1790 } 1794 }
1791 } 1795 }
1792 1796
1793 /* Don't generate a prototype for the next function, it generates an error on 1797 /* Don't generate a prototype for the next function, it generates an error on
1794 * newer Python versions. */ 1798 * newer Python versions. */