Karsten Hopp c6fc01
To: vim_dev@googlegroups.com
Karsten Hopp c6fc01
Subject: Patch 7.3.1231
Karsten Hopp c6fc01
Fcc: outbox
Karsten Hopp c6fc01
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp c6fc01
Mime-Version: 1.0
Karsten Hopp c6fc01
Content-Type: text/plain; charset=UTF-8
Karsten Hopp c6fc01
Content-Transfer-Encoding: 8bit
Karsten Hopp c6fc01
------------
Karsten Hopp c6fc01
Karsten Hopp c6fc01
Patch 7.3.1231
Karsten Hopp c6fc01
Problem:    Python: use of numbers not consistent.
Karsten Hopp c6fc01
Solution:   Add support for Number protocol. (ZyX)
Karsten Hopp c6fc01
Files:	    src/if_py_both.h, src/if_python3.c, src/if_python.c,
Karsten Hopp c6fc01
	    src/testdir/test86.ok, src/testdir/test87.ok
Karsten Hopp c6fc01
Karsten Hopp c6fc01
Karsten Hopp c6fc01
*** ../vim-7.3.1230/src/if_py_both.h	2013-06-23 13:46:36.000000000 +0200
Karsten Hopp c6fc01
--- src/if_py_both.h	2013-06-23 14:15:25.000000000 +0200
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 151,156 ****
Karsten Hopp c6fc01
--- 151,245 ----
Karsten Hopp c6fc01
      return (char_u *) p;
Karsten Hopp c6fc01
  }
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
+ #define NUMBER_LONG     1
Karsten Hopp c6fc01
+ #define NUMBER_INT      2
Karsten Hopp c6fc01
+ #define NUMBER_NATURAL  4
Karsten Hopp c6fc01
+ #define NUMBER_UNSIGNED 8
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+     static int
Karsten Hopp c6fc01
+ NumberToLong(PyObject *obj, long *result, int flags)
Karsten Hopp c6fc01
+ {
Karsten Hopp c6fc01
+ #if PY_MAJOR_VERSION < 3
Karsten Hopp c6fc01
+     if (PyInt_Check(obj))
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	*result = PyInt_AsLong(obj);
Karsten Hopp c6fc01
+ 	if (PyErr_Occurred())
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+     else
Karsten Hopp c6fc01
+ #endif
Karsten Hopp c6fc01
+     if (PyLong_Check(obj))
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	*result = PyLong_AsLong(obj);
Karsten Hopp c6fc01
+ 	if (PyErr_Occurred())
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+     else if (PyNumber_Check(obj))
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	PyObject	*num;
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	if (!(num = PyNumber_Long(obj)))
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	*result = PyLong_AsLong(num);
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	Py_DECREF(num);
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	if (PyErr_Occurred())
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+     else
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp c6fc01
+ #if PY_MAJOR_VERSION < 3
Karsten Hopp c6fc01
+ 		"expected int(), long() or something supporting "
Karsten Hopp c6fc01
+ 		"coercing to long(), but got %s"
Karsten Hopp c6fc01
+ #else
Karsten Hopp c6fc01
+ 		"expected int() or something supporting coercing to int(), "
Karsten Hopp c6fc01
+ 		"but got %s"
Karsten Hopp c6fc01
+ #endif
Karsten Hopp c6fc01
+ 		, Py_TYPE_NAME(obj));
Karsten Hopp c6fc01
+ 	return -1;
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+     if (flags & NUMBER_INT)
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	if (*result > INT_MAX)
Karsten Hopp c6fc01
+ 	{
Karsten Hopp c6fc01
+ 	    PyErr_SET_STRING(PyExc_OverflowError,
Karsten Hopp c6fc01
+ 		    "value is too large to fit into C int type");
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+ 	}
Karsten Hopp c6fc01
+ 	else if (*result < INT_MIN)
Karsten Hopp c6fc01
+ 	{
Karsten Hopp c6fc01
+ 	    PyErr_SET_STRING(PyExc_OverflowError,
Karsten Hopp c6fc01
+ 		    "value is too small to fit into C int type");
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+ 	}
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+     if (flags & NUMBER_NATURAL)
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	if (*result <= 0)
Karsten Hopp c6fc01
+ 	{
Karsten Hopp c6fc01
+ 	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp c6fc01
+ 		    "number must be greater then zero");
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+ 	}
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+     else if (flags & NUMBER_UNSIGNED)
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	if (*result < 0)
Karsten Hopp c6fc01
+ 	{
Karsten Hopp c6fc01
+ 	    PyErr_SET_STRING(PyExc_ValueError,
Karsten Hopp c6fc01
+ 		    "number must be greater or equal to zero");
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+ 	}
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+     return 0;
Karsten Hopp c6fc01
+ }
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
      static int
Karsten Hopp c6fc01
  add_string(PyObject *list, char *s)
Karsten Hopp c6fc01
  {
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 243,255 ****
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
      if (strcmp(name, "softspace") == 0)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	if (!PyInt_Check(val))
Karsten Hopp c6fc01
! 	{
Karsten Hopp c6fc01
! 	    PyErr_SET_STRING(PyExc_TypeError, "softspace must be an integer");
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
- 	}
Karsten Hopp c6fc01
- 
Karsten Hopp c6fc01
- 	self->softspace = PyInt_AsLong(val);
Karsten Hopp c6fc01
  	return 0;
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
--- 332,339 ----
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
      if (strcmp(name, "softspace") == 0)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	if (NumberToLong(val, &(self->softspace), NUMBER_UNSIGNED))
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  	return 0;
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 2839,2861 ****
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else if (flags & SOPT_NUM)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	int val;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! #if PY_MAJOR_VERSION < 3
Karsten Hopp c6fc01
! 	if (PyInt_Check(valObject))
Karsten Hopp c6fc01
! 	    val = PyInt_AsLong(valObject);
Karsten Hopp c6fc01
! 	else
Karsten Hopp c6fc01
! #endif
Karsten Hopp c6fc01
! 	if (PyLong_Check(valObject))
Karsten Hopp c6fc01
! 	    val = PyLong_AsLong(valObject);
Karsten Hopp c6fc01
! 	else
Karsten Hopp c6fc01
  	{
Karsten Hopp c6fc01
- 	    PyErr_SET_STRING(PyExc_TypeError, "object must be integer");
Karsten Hopp c6fc01
  	    Py_XDECREF(todecref);
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  	}
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	r = set_option_value_for(key, val, NULL, opt_flags,
Karsten Hopp c6fc01
  				self->opt_type, self->from);
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else
Karsten Hopp c6fc01
--- 2923,2937 ----
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else if (flags & SOPT_NUM)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	long	val;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	if (NumberToLong(valObject, &val, NUMBER_INT))
Karsten Hopp c6fc01
  	{
Karsten Hopp c6fc01
  	    Py_XDECREF(todecref);
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  	}
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	r = set_option_value_for(key, (int) val, NULL, opt_flags,
Karsten Hopp c6fc01
  				self->opt_type, self->from);
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 3265,3274 ****
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else if (strcmp(name, "height") == 0)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	int	height;
Karsten Hopp c6fc01
  	win_T	*savewin;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	if (!PyArg_Parse(val, "i", &height))
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  #ifdef FEAT_GUI
Karsten Hopp c6fc01
--- 3341,3350 ----
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else if (strcmp(name, "height") == 0)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	long	height;
Karsten Hopp c6fc01
  	win_T	*savewin;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	if (NumberToLong(val, &height, NUMBER_INT))
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  #ifdef FEAT_GUI
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 3278,3284 ****
Karsten Hopp c6fc01
  	curwin = self->win;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  	VimTryStart();
Karsten Hopp c6fc01
! 	win_setheight(height);
Karsten Hopp c6fc01
  	curwin = savewin;
Karsten Hopp c6fc01
  	if (VimTryEnd())
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
--- 3354,3360 ----
Karsten Hopp c6fc01
  	curwin = self->win;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  	VimTryStart();
Karsten Hopp c6fc01
! 	win_setheight((int) height);
Karsten Hopp c6fc01
  	curwin = savewin;
Karsten Hopp c6fc01
  	if (VimTryEnd())
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 3288,3297 ****
Karsten Hopp c6fc01
  #ifdef FEAT_VERTSPLIT
Karsten Hopp c6fc01
      else if (strcmp(name, "width") == 0)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	int	width;
Karsten Hopp c6fc01
  	win_T	*savewin;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	if (!PyArg_Parse(val, "i", &width))
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  #ifdef FEAT_GUI
Karsten Hopp c6fc01
--- 3364,3373 ----
Karsten Hopp c6fc01
  #ifdef FEAT_VERTSPLIT
Karsten Hopp c6fc01
      else if (strcmp(name, "width") == 0)
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
! 	long	width;
Karsten Hopp c6fc01
  	win_T	*savewin;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! 	if (NumberToLong(val, &width, NUMBER_INT))
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  #ifdef FEAT_GUI
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 3301,3307 ****
Karsten Hopp c6fc01
  	curwin = self->win;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  	VimTryStart();
Karsten Hopp c6fc01
! 	win_setwidth(width);
Karsten Hopp c6fc01
  	curwin = savewin;
Karsten Hopp c6fc01
  	if (VimTryEnd())
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
--- 3377,3383 ----
Karsten Hopp c6fc01
  	curwin = self->win;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  	VimTryStart();
Karsten Hopp c6fc01
! 	win_setwidth((int) width);
Karsten Hopp c6fc01
  	curwin = savewin;
Karsten Hopp c6fc01
  	if (VimTryEnd())
Karsten Hopp c6fc01
  	    return -1;
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 4555,4576 ****
Karsten Hopp c6fc01
  BufMapItem(PyObject *self UNUSED, PyObject *keyObject)
Karsten Hopp c6fc01
  {
Karsten Hopp c6fc01
      buf_T	*b;
Karsten Hopp c6fc01
!     int		bnr;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
! #if PY_MAJOR_VERSION < 3
Karsten Hopp c6fc01
!     if (PyInt_Check(keyObject))
Karsten Hopp c6fc01
! 	bnr = PyInt_AsLong(keyObject);
Karsten Hopp c6fc01
!     else
Karsten Hopp c6fc01
! #endif
Karsten Hopp c6fc01
!     if (PyLong_Check(keyObject))
Karsten Hopp c6fc01
! 	bnr = PyLong_AsLong(keyObject);
Karsten Hopp c6fc01
!     else
Karsten Hopp c6fc01
!     {
Karsten Hopp c6fc01
! 	PyErr_SET_STRING(PyExc_TypeError, "key must be integer");
Karsten Hopp c6fc01
  	return NULL;
Karsten Hopp c6fc01
-     }
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
!     b = buflist_findnr(bnr);
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
      if (b)
Karsten Hopp c6fc01
  	return BufferNew(b);
Karsten Hopp c6fc01
--- 4631,4642 ----
Karsten Hopp c6fc01
  BufMapItem(PyObject *self UNUSED, PyObject *keyObject)
Karsten Hopp c6fc01
  {
Karsten Hopp c6fc01
      buf_T	*b;
Karsten Hopp c6fc01
!     long	bnr;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
!     if (NumberToLong(keyObject, &bnr, NUMBER_INT|NUMBER_NATURAL))
Karsten Hopp c6fc01
  	return NULL;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
!     b = buflist_findnr((int) bnr);
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
      if (b)
Karsten Hopp c6fc01
  	return BufferNew(b);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 5345,5356 ****
Karsten Hopp c6fc01
--- 5411,5426 ----
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
  	tv->v_type = VAR_NUMBER;
Karsten Hopp c6fc01
  	tv->vval.v_number = (varnumber_T) PyInt_AsLong(obj);
Karsten Hopp c6fc01
+ 	if (PyErr_Occurred())
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
  #endif
Karsten Hopp c6fc01
      else if (PyLong_Check(obj))
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
  	tv->v_type = VAR_NUMBER;
Karsten Hopp c6fc01
  	tv->vval.v_number = (varnumber_T) PyLong_AsLong(obj);
Karsten Hopp c6fc01
+ 	if (PyErr_Occurred())
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
      }
Karsten Hopp c6fc01
      else if (PyDict_Check(obj))
Karsten Hopp c6fc01
  	return convert_dl(obj, tv, pydict_to_tv, lookup_dict);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 5367,5372 ****
Karsten Hopp c6fc01
--- 5437,5454 ----
Karsten Hopp c6fc01
  	return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
Karsten Hopp c6fc01
      else if (PyMapping_Check(obj))
Karsten Hopp c6fc01
  	return convert_dl(obj, tv, pymap_to_tv, lookup_dict);
Karsten Hopp c6fc01
+     else if (PyNumber_Check(obj))
Karsten Hopp c6fc01
+     {
Karsten Hopp c6fc01
+ 	PyObject	*num;
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	if (!(num = PyNumber_Long(obj)))
Karsten Hopp c6fc01
+ 	    return -1;
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	tv->v_type = VAR_NUMBER;
Karsten Hopp c6fc01
+ 	tv->vval.v_number = (varnumber_T) PyLong_AsLong(num);
Karsten Hopp c6fc01
+ 
Karsten Hopp c6fc01
+ 	Py_DECREF(num);
Karsten Hopp c6fc01
+     }
Karsten Hopp c6fc01
      else
Karsten Hopp c6fc01
      {
Karsten Hopp c6fc01
  	PyErr_FORMAT(PyExc_TypeError,
Karsten Hopp c6fc01
*** ../vim-7.3.1230/src/if_python3.c	2013-06-23 13:46:36.000000000 +0200
Karsten Hopp c6fc01
--- src/if_python3.c	2013-06-23 14:15:25.000000000 +0200
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 160,165 ****
Karsten Hopp c6fc01
--- 160,166 ----
Karsten Hopp c6fc01
  # define PyMapping_Keys py3_PyMapping_Keys
Karsten Hopp c6fc01
  # define PyIter_Next py3_PyIter_Next
Karsten Hopp c6fc01
  # define PyObject_GetIter py3_PyObject_GetIter
Karsten Hopp c6fc01
+ # define PyObject_Repr py3_PyObject_Repr
Karsten Hopp c6fc01
  # define PyObject_GetItem py3_PyObject_GetItem
Karsten Hopp c6fc01
  # define PyObject_IsTrue py3_PyObject_IsTrue
Karsten Hopp c6fc01
  # define PyModule_GetDict py3_PyModule_GetDict
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 211,216 ****
Karsten Hopp c6fc01
--- 212,219 ----
Karsten Hopp c6fc01
  # define PyType_Type (*py3_PyType_Type)
Karsten Hopp c6fc01
  # define PySlice_Type (*py3_PySlice_Type)
Karsten Hopp c6fc01
  # define PyFloat_Type (*py3_PyFloat_Type)
Karsten Hopp c6fc01
+ # define PyNumber_Check (*py3_PyNumber_Check)
Karsten Hopp c6fc01
+ # define PyNumber_Long (*py3_PyNumber_Long)
Karsten Hopp c6fc01
  # define PyBool_Type (*py3_PyBool_Type)
Karsten Hopp c6fc01
  # define PyErr_NewException py3_PyErr_NewException
Karsten Hopp c6fc01
  # ifdef Py_DEBUG
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 310,315 ****
Karsten Hopp c6fc01
--- 313,319 ----
Karsten Hopp c6fc01
  static PyObject* (*py3_PyDict_New)(void);
Karsten Hopp c6fc01
  static PyObject* (*py3_PyIter_Next)(PyObject *);
Karsten Hopp c6fc01
  static PyObject* (*py3_PyObject_GetIter)(PyObject *);
Karsten Hopp c6fc01
+ static PyObject* (*py3_PyObject_Repr)(PyObject *);
Karsten Hopp c6fc01
  static PyObject* (*py3_PyObject_GetItem)(PyObject *, PyObject *);
Karsten Hopp c6fc01
  static int (*py3_PyObject_IsTrue)(PyObject *);
Karsten Hopp c6fc01
  static PyObject* (*py3_Py_BuildValue)(char *, ...);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 365,370 ****
Karsten Hopp c6fc01
--- 369,376 ----
Karsten Hopp c6fc01
  static PyTypeObject* py3_PySlice_Type;
Karsten Hopp c6fc01
  static PyTypeObject* py3_PyFloat_Type;
Karsten Hopp c6fc01
  static PyTypeObject* py3_PyBool_Type;
Karsten Hopp c6fc01
+ static int (*py3_PyNumber_Check)(PyObject *);
Karsten Hopp c6fc01
+ static PyObject* (*py3_PyNumber_Long)(PyObject *);
Karsten Hopp c6fc01
  static PyObject* (*py3_PyErr_NewException)(char *name, PyObject *base, PyObject *dict);
Karsten Hopp c6fc01
  static PyObject* (*py3_PyCapsule_New)(void *, char *, PyCapsule_Destructor);
Karsten Hopp c6fc01
  static void* (*py3_PyCapsule_GetPointer)(PyObject *, char *);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 399,404 ****
Karsten Hopp c6fc01
--- 405,411 ----
Karsten Hopp c6fc01
  static PyObject *p3imp_PyExc_ValueError;
Karsten Hopp c6fc01
  static PyObject *p3imp_PyExc_RuntimeError;
Karsten Hopp c6fc01
  static PyObject *p3imp_PyExc_ImportError;
Karsten Hopp c6fc01
+ static PyObject *p3imp_PyExc_OverflowError;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  # define PyExc_AttributeError p3imp_PyExc_AttributeError
Karsten Hopp c6fc01
  # define PyExc_IndexError p3imp_PyExc_IndexError
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 408,413 ****
Karsten Hopp c6fc01
--- 415,421 ----
Karsten Hopp c6fc01
  # define PyExc_ValueError p3imp_PyExc_ValueError
Karsten Hopp c6fc01
  # define PyExc_RuntimeError p3imp_PyExc_RuntimeError
Karsten Hopp c6fc01
  # define PyExc_ImportError p3imp_PyExc_ImportError
Karsten Hopp c6fc01
+ # define PyExc_OverflowError p3imp_PyExc_OverflowError
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  /*
Karsten Hopp c6fc01
   * Table of name to function pointer of python.
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 469,474 ****
Karsten Hopp c6fc01
--- 477,483 ----
Karsten Hopp c6fc01
      {"PyMapping_Keys", (PYTHON_PROC*)&py3_PyMapping_Keys},
Karsten Hopp c6fc01
      {"PyIter_Next", (PYTHON_PROC*)&py3_PyIter_Next},
Karsten Hopp c6fc01
      {"PyObject_GetIter", (PYTHON_PROC*)&py3_PyObject_GetIter},
Karsten Hopp c6fc01
+     {"PyObject_Repr", (PYTHON_PROC*)&py3_PyObject_Repr},
Karsten Hopp c6fc01
      {"PyObject_GetItem", (PYTHON_PROC*)&py3_PyObject_GetItem},
Karsten Hopp c6fc01
      {"PyObject_IsTrue", (PYTHON_PROC*)&py3_PyObject_IsTrue},
Karsten Hopp c6fc01
      {"PyLong_FromLong", (PYTHON_PROC*)&py3_PyLong_FromLong},
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 518,523 ****
Karsten Hopp c6fc01
--- 527,534 ----
Karsten Hopp c6fc01
      {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type},
Karsten Hopp c6fc01
      {"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type},
Karsten Hopp c6fc01
      {"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type},
Karsten Hopp c6fc01
+     {"PyNumber_Check", (PYTHON_PROC*)&py3_PyNumber_Check},
Karsten Hopp c6fc01
+     {"PyNumber_Long", (PYTHON_PROC*)&py3_PyNumber_Long},
Karsten Hopp c6fc01
      {"PyErr_NewException", (PYTHON_PROC*)&py3_PyErr_NewException},
Karsten Hopp c6fc01
  # ifdef Py_DEBUG
Karsten Hopp c6fc01
      {"_Py_NegativeRefcount", (PYTHON_PROC*)&py3__Py_NegativeRefcount},
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 672,677 ****
Karsten Hopp c6fc01
--- 683,689 ----
Karsten Hopp c6fc01
      p3imp_PyExc_ValueError = PyDict_GetItemString(exdict, "ValueError");
Karsten Hopp c6fc01
      p3imp_PyExc_RuntimeError = PyDict_GetItemString(exdict, "RuntimeError");
Karsten Hopp c6fc01
      p3imp_PyExc_ImportError = PyDict_GetItemString(exdict, "ImportError");
Karsten Hopp c6fc01
+     p3imp_PyExc_OverflowError = PyDict_GetItemString(exdict, "OverflowError");
Karsten Hopp c6fc01
      Py_XINCREF(p3imp_PyExc_AttributeError);
Karsten Hopp c6fc01
      Py_XINCREF(p3imp_PyExc_IndexError);
Karsten Hopp c6fc01
      Py_XINCREF(p3imp_PyExc_KeyError);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 680,685 ****
Karsten Hopp c6fc01
--- 692,698 ----
Karsten Hopp c6fc01
      Py_XINCREF(p3imp_PyExc_ValueError);
Karsten Hopp c6fc01
      Py_XINCREF(p3imp_PyExc_RuntimeError);
Karsten Hopp c6fc01
      Py_XINCREF(p3imp_PyExc_ImportError);
Karsten Hopp c6fc01
+     Py_XINCREF(p3imp_PyExc_OverflowError);
Karsten Hopp c6fc01
      Py_XDECREF(exmod);
Karsten Hopp c6fc01
  }
Karsten Hopp c6fc01
  #endif /* DYNAMIC_PYTHON3 */
Karsten Hopp c6fc01
*** ../vim-7.3.1230/src/if_python.c	2013-06-23 13:46:36.000000000 +0200
Karsten Hopp c6fc01
--- src/if_python.c	2013-06-23 14:15:25.000000000 +0200
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 220,225 ****
Karsten Hopp c6fc01
--- 220,226 ----
Karsten Hopp c6fc01
  # define PyObject_CallFunctionObjArgs dll_PyObject_CallFunctionObjArgs
Karsten Hopp c6fc01
  # define PyObject_CallFunction dll_PyObject_CallFunction
Karsten Hopp c6fc01
  # define PyObject_Call dll_PyObject_Call
Karsten Hopp c6fc01
+ # define PyObject_Repr dll_PyObject_Repr
Karsten Hopp c6fc01
  # define PyString_AsString dll_PyString_AsString
Karsten Hopp c6fc01
  # define PyString_AsStringAndSize dll_PyString_AsStringAndSize
Karsten Hopp c6fc01
  # define PyString_FromString dll_PyString_FromString
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 233,238 ****
Karsten Hopp c6fc01
--- 234,241 ----
Karsten Hopp c6fc01
  # define PyFloat_AsDouble dll_PyFloat_AsDouble
Karsten Hopp c6fc01
  # define PyFloat_FromDouble dll_PyFloat_FromDouble
Karsten Hopp c6fc01
  # define PyFloat_Type (*dll_PyFloat_Type)
Karsten Hopp c6fc01
+ # define PyNumber_Check dll_PyNumber_Check
Karsten Hopp c6fc01
+ # define PyNumber_Long dll_PyNumber_Long
Karsten Hopp c6fc01
  # define PyImport_AddModule (*dll_PyImport_AddModule)
Karsten Hopp c6fc01
  # define PySys_SetObject dll_PySys_SetObject
Karsten Hopp c6fc01
  # define PySys_GetObject dll_PySys_GetObject
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 360,365 ****
Karsten Hopp c6fc01
--- 363,369 ----
Karsten Hopp c6fc01
  static PyObject* (*dll_PyObject_CallFunctionObjArgs)(PyObject *, ...);
Karsten Hopp c6fc01
  static PyObject* (*dll_PyObject_CallFunction)(PyObject *, char *, ...);
Karsten Hopp c6fc01
  static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *);
Karsten Hopp c6fc01
+ static PyObject* (*dll_PyObject_Repr)(PyObject *);
Karsten Hopp c6fc01
  static char*(*dll_PyString_AsString)(PyObject *);
Karsten Hopp c6fc01
  static int(*dll_PyString_AsStringAndSize)(PyObject *, char **, int *);
Karsten Hopp c6fc01
  static PyObject*(*dll_PyString_FromString)(const char *);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 372,377 ****
Karsten Hopp c6fc01
--- 376,383 ----
Karsten Hopp c6fc01
  static double(*dll_PyFloat_AsDouble)(PyObject *);
Karsten Hopp c6fc01
  static PyObject*(*dll_PyFloat_FromDouble)(double);
Karsten Hopp c6fc01
  static PyTypeObject* dll_PyFloat_Type;
Karsten Hopp c6fc01
+ static int(*dll_PyNumber_Check)(PyObject *);
Karsten Hopp c6fc01
+ static PyObject*(*dll_PyNumber_Long)(PyObject *);
Karsten Hopp c6fc01
  static int(*dll_PySys_SetObject)(char *, PyObject *);
Karsten Hopp c6fc01
  static PyObject *(*dll_PySys_GetObject)(char *);
Karsten Hopp c6fc01
  static int(*dll_PySys_SetArgv)(int, char **);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 440,445 ****
Karsten Hopp c6fc01
--- 446,452 ----
Karsten Hopp c6fc01
  static PyObject *imp_PyExc_ValueError;
Karsten Hopp c6fc01
  static PyObject *imp_PyExc_RuntimeError;
Karsten Hopp c6fc01
  static PyObject *imp_PyExc_ImportError;
Karsten Hopp c6fc01
+ static PyObject *imp_PyExc_OverflowError;
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  # define PyExc_AttributeError imp_PyExc_AttributeError
Karsten Hopp c6fc01
  # define PyExc_IndexError imp_PyExc_IndexError
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 449,454 ****
Karsten Hopp c6fc01
--- 456,462 ----
Karsten Hopp c6fc01
  # define PyExc_ValueError imp_PyExc_ValueError
Karsten Hopp c6fc01
  # define PyExc_RuntimeError imp_PyExc_RuntimeError
Karsten Hopp c6fc01
  # define PyExc_ImportError imp_PyExc_ImportError
Karsten Hopp c6fc01
+ # define PyExc_OverflowError imp_PyExc_OverflowError
Karsten Hopp c6fc01
  
Karsten Hopp c6fc01
  /*
Karsten Hopp c6fc01
   * Table of name to function pointer of python.
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 533,538 ****
Karsten Hopp c6fc01
--- 541,547 ----
Karsten Hopp c6fc01
      {"PyObject_CallFunctionObjArgs", (PYTHON_PROC*)&dll_PyObject_CallFunctionObjArgs},
Karsten Hopp c6fc01
      {"PyObject_CallFunction", (PYTHON_PROC*)&dll_PyObject_CallFunction},
Karsten Hopp c6fc01
      {"PyObject_Call", (PYTHON_PROC*)&dll_PyObject_Call},
Karsten Hopp c6fc01
+     {"PyObject_Repr", (PYTHON_PROC*)&dll_PyObject_Repr},
Karsten Hopp c6fc01
      {"PyString_AsString", (PYTHON_PROC*)&dll_PyString_AsString},
Karsten Hopp c6fc01
      {"PyString_AsStringAndSize", (PYTHON_PROC*)&dll_PyString_AsStringAndSize},
Karsten Hopp c6fc01
      {"PyString_FromString", (PYTHON_PROC*)&dll_PyString_FromString},
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 545,550 ****
Karsten Hopp c6fc01
--- 554,561 ----
Karsten Hopp c6fc01
      {"PyFloat_AsDouble", (PYTHON_PROC*)&dll_PyFloat_AsDouble},
Karsten Hopp c6fc01
      {"PyFloat_FromDouble", (PYTHON_PROC*)&dll_PyFloat_FromDouble},
Karsten Hopp c6fc01
      {"PyImport_AddModule", (PYTHON_PROC*)&dll_PyImport_AddModule},
Karsten Hopp c6fc01
+     {"PyNumber_Check", (PYTHON_PROC*)&dll_PyNumber_Check},
Karsten Hopp c6fc01
+     {"PyNumber_Long", (PYTHON_PROC*)&dll_PyNumber_Long},
Karsten Hopp c6fc01
      {"PySys_SetObject", (PYTHON_PROC*)&dll_PySys_SetObject},
Karsten Hopp c6fc01
      {"PySys_GetObject", (PYTHON_PROC*)&dll_PySys_GetObject},
Karsten Hopp c6fc01
      {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv},
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 722,727 ****
Karsten Hopp c6fc01
--- 733,739 ----
Karsten Hopp c6fc01
      imp_PyExc_ValueError = PyDict_GetItemString(exdict, "ValueError");
Karsten Hopp c6fc01
      imp_PyExc_RuntimeError = PyDict_GetItemString(exdict, "RuntimeError");
Karsten Hopp c6fc01
      imp_PyExc_ImportError = PyDict_GetItemString(exdict, "ImportError");
Karsten Hopp c6fc01
+     imp_PyExc_OverflowError = PyDict_GetItemString(exdict, "OverflowError");
Karsten Hopp c6fc01
      Py_XINCREF(imp_PyExc_AttributeError);
Karsten Hopp c6fc01
      Py_XINCREF(imp_PyExc_IndexError);
Karsten Hopp c6fc01
      Py_XINCREF(imp_PyExc_KeyError);
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 730,735 ****
Karsten Hopp c6fc01
--- 742,748 ----
Karsten Hopp c6fc01
      Py_XINCREF(imp_PyExc_ValueError);
Karsten Hopp c6fc01
      Py_XINCREF(imp_PyExc_RuntimeError);
Karsten Hopp c6fc01
      Py_XINCREF(imp_PyExc_ImportError);
Karsten Hopp c6fc01
+     Py_XINCREF(imp_PyExc_OverflowError);
Karsten Hopp c6fc01
      Py_XDECREF(exmod);
Karsten Hopp c6fc01
  }
Karsten Hopp c6fc01
  #endif /* DYNAMIC_PYTHON */
Karsten Hopp c6fc01
*** ../vim-7.3.1230/src/testdir/test86.ok	2013-06-23 13:46:36.000000000 +0200
Karsten Hopp c6fc01
--- src/testdir/test86.ok	2013-06-23 14:15:25.000000000 +0200
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 438,444 ****
Karsten Hopp c6fc01
  > Output
Karsten Hopp c6fc01
  >> OutputSetattr
Karsten Hopp c6fc01
  del sys.stdout.softspace:AttributeError:("can't delete OutputObject attributes",)
Karsten Hopp c6fc01
! sys.stdout.softspace = []:TypeError:('softspace must be an integer',)
Karsten Hopp c6fc01
  sys.stdout.attr = None:AttributeError:('invalid attribute: attr',)
Karsten Hopp c6fc01
  >> OutputWrite
Karsten Hopp c6fc01
  sys.stdout.write(None):TypeError:('coercing to Unicode: need string or buffer, NoneType found',)
Karsten Hopp c6fc01
--- 438,444 ----
Karsten Hopp c6fc01
  > Output
Karsten Hopp c6fc01
  >> OutputSetattr
Karsten Hopp c6fc01
  del sys.stdout.softspace:AttributeError:("can't delete OutputObject attributes",)
Karsten Hopp c6fc01
! sys.stdout.softspace = []:TypeError:('expected int(), long() or something supporting coercing to long(), but got list',)
Karsten Hopp c6fc01
  sys.stdout.attr = None:AttributeError:('invalid attribute: attr',)
Karsten Hopp c6fc01
  >> OutputWrite
Karsten Hopp c6fc01
  sys.stdout.write(None):TypeError:('coercing to Unicode: need string or buffer, NoneType found',)
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 1037,1044 ****
Karsten Hopp c6fc01
  vim.current.window.buffer = 0:TypeError:('readonly attribute: buffer',)
Karsten Hopp c6fc01
  vim.current.window.cursor = (100000000, 100000000):error:('cursor position outside buffer',)
Karsten Hopp c6fc01
  vim.current.window.cursor = True:TypeError:('argument must be 2-item sequence, not bool',)
Karsten Hopp c6fc01
! vim.current.window.height = "abc":TypeError:('an integer is required',)
Karsten Hopp c6fc01
! vim.current.window.width  = "abc":TypeError:('an integer is required',)
Karsten Hopp c6fc01
  vim.current.window.xxxxxx = True:AttributeError:('xxxxxx',)
Karsten Hopp c6fc01
  > WinList
Karsten Hopp c6fc01
  >> WinListItem
Karsten Hopp c6fc01
--- 1037,1044 ----
Karsten Hopp c6fc01
  vim.current.window.buffer = 0:TypeError:('readonly attribute: buffer',)
Karsten Hopp c6fc01
  vim.current.window.cursor = (100000000, 100000000):error:('cursor position outside buffer',)
Karsten Hopp c6fc01
  vim.current.window.cursor = True:TypeError:('argument must be 2-item sequence, not bool',)
Karsten Hopp c6fc01
! vim.current.window.height = "abc":TypeError:('expected int(), long() or something supporting coercing to long(), but got str',)
Karsten Hopp c6fc01
! vim.current.window.width  = "abc":TypeError:('expected int(), long() or something supporting coercing to long(), but got str',)
Karsten Hopp c6fc01
  vim.current.window.xxxxxx = True:AttributeError:('xxxxxx',)
Karsten Hopp c6fc01
  > WinList
Karsten Hopp c6fc01
  >> WinListItem
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 1072,1078 ****
Karsten Hopp c6fc01
  vim.current.buffer.range(1, 2, 3):TypeError:('function takes exactly 2 arguments (3 given)',)
Karsten Hopp c6fc01
  > BufMap
Karsten Hopp c6fc01
  >> BufMapItem
Karsten Hopp c6fc01
! vim.buffers[None]:TypeError:('key must be integer',)
Karsten Hopp c6fc01
  vim.buffers[100000000]:KeyError:(100000000,)
Karsten Hopp c6fc01
  > Current
Karsten Hopp c6fc01
  >> CurrentGetattr
Karsten Hopp c6fc01
--- 1072,1078 ----
Karsten Hopp c6fc01
  vim.current.buffer.range(1, 2, 3):TypeError:('function takes exactly 2 arguments (3 given)',)
Karsten Hopp c6fc01
  > BufMap
Karsten Hopp c6fc01
  >> BufMapItem
Karsten Hopp c6fc01
! vim.buffers[None]:TypeError:('expected int(), long() or something supporting coercing to long(), but got NoneType',)
Karsten Hopp c6fc01
  vim.buffers[100000000]:KeyError:(100000000,)
Karsten Hopp c6fc01
  > Current
Karsten Hopp c6fc01
  >> CurrentGetattr
Karsten Hopp c6fc01
*** ../vim-7.3.1230/src/testdir/test87.ok	2013-06-23 13:46:36.000000000 +0200
Karsten Hopp c6fc01
--- src/testdir/test87.ok	2013-06-23 14:15:25.000000000 +0200
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 427,433 ****
Karsten Hopp c6fc01
  > Output
Karsten Hopp c6fc01
  >> OutputSetattr
Karsten Hopp c6fc01
  del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError("can't delete OutputObject attributes",))
Karsten Hopp c6fc01
! sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('softspace must be an integer',))
Karsten Hopp c6fc01
  sys.stdout.attr = None:(<class 'AttributeError'>, AttributeError('invalid attribute: attr',))
Karsten Hopp c6fc01
  >> OutputWrite
Karsten Hopp c6fc01
  sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
Karsten Hopp c6fc01
--- 427,433 ----
Karsten Hopp c6fc01
  > Output
Karsten Hopp c6fc01
  >> OutputSetattr
Karsten Hopp c6fc01
  del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError("can't delete OutputObject attributes",))
Karsten Hopp c6fc01
! sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got list',))
Karsten Hopp c6fc01
  sys.stdout.attr = None:(<class 'AttributeError'>, AttributeError('invalid attribute: attr',))
Karsten Hopp c6fc01
  >> OutputWrite
Karsten Hopp c6fc01
  sys.stdout.write(None):(<class 'TypeError'>, TypeError("Can't convert 'NoneType' object to str implicitly",))
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 1046,1053 ****
Karsten Hopp c6fc01
  vim.current.window.buffer = 0:(<class 'TypeError'>, TypeError('readonly attribute: buffer',))
Karsten Hopp c6fc01
  vim.current.window.cursor = (100000000, 100000000):(<class 'vim.error'>, error('cursor position outside buffer',))
Karsten Hopp c6fc01
  vim.current.window.cursor = True:(<class 'TypeError'>, TypeError('argument must be 2-item sequence, not bool',))
Karsten Hopp c6fc01
! vim.current.window.height = "abc":(<class 'TypeError'>, TypeError('an integer is required',))
Karsten Hopp c6fc01
! vim.current.window.width  = "abc":(<class 'TypeError'>, TypeError('an integer is required',))
Karsten Hopp c6fc01
  vim.current.window.xxxxxx = True:(<class 'AttributeError'>, AttributeError('xxxxxx',))
Karsten Hopp c6fc01
  > WinList
Karsten Hopp c6fc01
  >> WinListItem
Karsten Hopp c6fc01
--- 1046,1053 ----
Karsten Hopp c6fc01
  vim.current.window.buffer = 0:(<class 'TypeError'>, TypeError('readonly attribute: buffer',))
Karsten Hopp c6fc01
  vim.current.window.cursor = (100000000, 100000000):(<class 'vim.error'>, error('cursor position outside buffer',))
Karsten Hopp c6fc01
  vim.current.window.cursor = True:(<class 'TypeError'>, TypeError('argument must be 2-item sequence, not bool',))
Karsten Hopp c6fc01
! vim.current.window.height = "abc":(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got str',))
Karsten Hopp c6fc01
! vim.current.window.width  = "abc":(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got str',))
Karsten Hopp c6fc01
  vim.current.window.xxxxxx = True:(<class 'AttributeError'>, AttributeError('xxxxxx',))
Karsten Hopp c6fc01
  > WinList
Karsten Hopp c6fc01
  >> WinListItem
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 1081,1087 ****
Karsten Hopp c6fc01
  vim.current.buffer.range(1, 2, 3):(<class 'TypeError'>, TypeError('function takes exactly 2 arguments (3 given)',))
Karsten Hopp c6fc01
  > BufMap
Karsten Hopp c6fc01
  >> BufMapItem
Karsten Hopp c6fc01
! vim.buffers[None]:(<class 'TypeError'>, TypeError('key must be integer',))
Karsten Hopp c6fc01
  vim.buffers[100000000]:(<class 'KeyError'>, KeyError(100000000,))
Karsten Hopp c6fc01
  > Current
Karsten Hopp c6fc01
  >> CurrentGetattr
Karsten Hopp c6fc01
--- 1081,1087 ----
Karsten Hopp c6fc01
  vim.current.buffer.range(1, 2, 3):(<class 'TypeError'>, TypeError('function takes exactly 2 arguments (3 given)',))
Karsten Hopp c6fc01
  > BufMap
Karsten Hopp c6fc01
  >> BufMapItem
Karsten Hopp c6fc01
! vim.buffers[None]:(<class 'TypeError'>, TypeError('expected int() or something supporting coercing to int(), but got NoneType',))
Karsten Hopp c6fc01
  vim.buffers[100000000]:(<class 'KeyError'>, KeyError(100000000,))
Karsten Hopp c6fc01
  > Current
Karsten Hopp c6fc01
  >> CurrentGetattr
Karsten Hopp c6fc01
*** ../vim-7.3.1230/src/version.c	2013-06-23 13:46:36.000000000 +0200
Karsten Hopp c6fc01
--- src/version.c	2013-06-23 14:13:45.000000000 +0200
Karsten Hopp c6fc01
***************
Karsten Hopp c6fc01
*** 730,731 ****
Karsten Hopp c6fc01
--- 730,733 ----
Karsten Hopp c6fc01
  {   /* Add new patch number below this line */
Karsten Hopp c6fc01
+ /**/
Karsten Hopp c6fc01
+     1231,
Karsten Hopp c6fc01
  /**/
Karsten Hopp c6fc01
Karsten Hopp c6fc01
-- 
Karsten Hopp c6fc01
MAN:    Fetchez la vache!
Karsten Hopp c6fc01
GUARD:  Quoi?
Karsten Hopp c6fc01
MAN:    Fetchez la vache!
Karsten Hopp c6fc01
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp c6fc01
Karsten Hopp c6fc01
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp c6fc01
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp c6fc01
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp c6fc01
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///