Loading ...
Sorry, an error occurred while loading the content.

Patch 7.1.307

Expand Messages
  • Bram Moolenaar
    Patch 7.1.307 Problem: Many warnings when compiling with Python 2.5. Solution: Use ssize_t instead of int for some types. (James Vega) Files:
    Message 1 of 1 , Jun 4, 2008
    • 0 Attachment
      Patch 7.1.307
      Problem: Many warnings when compiling with Python 2.5.
      Solution: Use ssize_t instead of int for some types. (James Vega)
      Files: src/if_python.c


      *** ../vim-7.1.306/src/if_python.c Thu Mar 8 10:20:28 2007
      --- src/if_python.c Wed May 7 16:55:44 2008
      ***************
      *** 38,43 ****
      --- 38,45 ----
      # undef HAVE_STDARG_H /* Python's config.h defines it as well. */
      #endif

      + #define PY_SSIZE_T_CLEAN
      +
      #include <Python.h>
      #if defined(MACOS) && !defined(MACOS_X_UNIX)
      # include "macglue.h"
      ***************
      *** 55,60 ****
      --- 57,78 ----
      # define PySequenceMethods int
      #endif

      + #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000
      + # define PyInt Py_ssize_t
      + # define PyInquiry lenfunc
      + # define PyIntArgFunc ssizeargfunc
      + # define PyIntIntArgFunc ssizessizeargfunc
      + # define PyIntObjArgProc ssizeobjargproc
      + # define PyIntIntObjArgProc ssizessizeobjargproc
      + #else
      + # define PyInt int
      + # define PyInquiry inquiry
      + # define PyIntArgFunc intargfunc
      + # define PyIntIntArgFunc intintargfunc
      + # define PyIntObjArgProc intobjargproc
      + # define PyIntIntObjArgProc intintobjargproc
      + #endif
      +
      /* Parser flags */
      #define single_input 256
      #define file_input 257
      ***************
      *** 150,160 ****
      static long(*dll_PyInt_AsLong)(PyObject *);
      static PyObject*(*dll_PyInt_FromLong)(long);
      static PyTypeObject* dll_PyInt_Type;
      ! static PyObject*(*dll_PyList_GetItem)(PyObject *, int);
      static PyObject*(*dll_PyList_Append)(PyObject *, PyObject *);
      ! static PyObject*(*dll_PyList_New)(int size);
      ! static int(*dll_PyList_SetItem)(PyObject *, int, PyObject *);
      ! static int(*dll_PyList_Size)(PyObject *);
      static PyTypeObject* dll_PyList_Type;
      static PyObject*(*dll_PyImport_ImportModule)(const char *);
      static PyObject*(*dll_PyDict_New)(void);
      --- 168,178 ----
      static long(*dll_PyInt_AsLong)(PyObject *);
      static PyObject*(*dll_PyInt_FromLong)(long);
      static PyTypeObject* dll_PyInt_Type;
      ! static PyObject*(*dll_PyList_GetItem)(PyObject *, PyInt);
      static PyObject*(*dll_PyList_Append)(PyObject *, PyObject *);
      ! static PyObject*(*dll_PyList_New)(PyInt size);
      ! static int(*dll_PyList_SetItem)(PyObject *, PyInt, PyObject *);
      ! static PyInt(*dll_PyList_Size)(PyObject *);
      static PyTypeObject* dll_PyList_Type;
      static PyObject*(*dll_PyImport_ImportModule)(const char *);
      static PyObject*(*dll_PyDict_New)(void);
      ***************
      *** 163,170 ****
      static int(*dll_PyRun_SimpleString)(char *);
      static char*(*dll_PyString_AsString)(PyObject *);
      static PyObject*(*dll_PyString_FromString)(const char *);
      ! static PyObject*(*dll_PyString_FromStringAndSize)(const char *, int);
      ! static int(*dll_PyString_Size)(PyObject *);
      static PyTypeObject* dll_PyString_Type;
      static int(*dll_PySys_SetObject)(char *, PyObject *);
      static int(*dll_PySys_SetArgv)(int, char **);
      --- 181,188 ----
      static int(*dll_PyRun_SimpleString)(char *);
      static char*(*dll_PyString_AsString)(PyObject *);
      static PyObject*(*dll_PyString_FromString)(const char *);
      ! static PyObject*(*dll_PyString_FromStringAndSize)(const char *, PyInt);
      ! static PyInt(*dll_PyString_Size)(PyObject *);
      static PyTypeObject* dll_PyString_Type;
      static int(*dll_PySys_SetObject)(char *, PyObject *);
      static int(*dll_PySys_SetArgv)(int, char **);
      ***************
      *** 367,376 ****
      * ----------------------------------------------
      */
      static PyObject *GetBufferLine(buf_T *, int);
      ! static PyObject *GetBufferLineList(buf_T *, int, int);

      static int SetBufferLine(buf_T *, int, PyObject *, int *);
      ! static int SetBufferLineList(buf_T *, int, int, PyObject *, int *);
      static int InsertBufferLines(buf_T *, int, PyObject *, int *);

      static PyObject *LineToString(const char *);
      --- 385,394 ----
      * ----------------------------------------------
      */
      static PyObject *GetBufferLine(buf_T *, int);
      ! static PyObject *GetBufferLineList(buf_T *, PyInt, PyInt);

      static int SetBufferLine(buf_T *, int, PyObject *, int *);
      ! static int SetBufferLineList(buf_T *, PyInt, PyInt, PyObject *, int *);
      static int InsertBufferLines(buf_T *, int, PyObject *, int *);

      static PyObject *LineToString(const char *);
      ***************
      *** 773,780 ****
      static PyObject *
      OutputWritelines(PyObject *self, PyObject *args)
      {
      ! int n;
      ! int i;
      PyObject *list;
      int error = ((OutputObject *)(self))->error;

      --- 791,798 ----
      static PyObject *
      OutputWritelines(PyObject *self, PyObject *args)
      {
      ! PyInt n;
      ! PyInt i;
      PyObject *list;
      int error = ((OutputObject *)(self))->error;

      ***************
      *** 986,996 ****
      static PyObject *BufferGetattr(PyObject *, char *);
      static PyObject *BufferRepr(PyObject *);

      ! static int BufferLength(PyObject *);
      ! static PyObject *BufferItem(PyObject *, int);
      ! static PyObject *BufferSlice(PyObject *, int, int);
      ! static int BufferAssItem(PyObject *, int, PyObject *);
      ! static int BufferAssSlice(PyObject *, int, int, PyObject *);

      static PyObject *BufferAppend(PyObject *, PyObject *);
      static PyObject *BufferMark(PyObject *, PyObject *);
      --- 1004,1014 ----
      static PyObject *BufferGetattr(PyObject *, char *);
      static PyObject *BufferRepr(PyObject *);

      ! static PyInt BufferLength(PyObject *);
      ! static PyObject *BufferItem(PyObject *, PyInt);
      ! static PyObject *BufferSlice(PyObject *, PyInt, PyInt);
      ! static PyInt BufferAssItem(PyObject *, PyInt, PyObject *);
      ! static PyInt BufferAssSlice(PyObject *, PyInt, PyInt, PyObject *);

      static PyObject *BufferAppend(PyObject *, PyObject *);
      static PyObject *BufferMark(PyObject *, PyObject *);
      ***************
      *** 1017,1027 ****
      static PyObject *RangeGetattr(PyObject *, char *);
      static PyObject *RangeRepr(PyObject *);

      ! static int RangeLength(PyObject *);
      ! static PyObject *RangeItem(PyObject *, int);
      ! static PyObject *RangeSlice(PyObject *, int, int);
      ! static int RangeAssItem(PyObject *, int, PyObject *);
      ! static int RangeAssSlice(PyObject *, int, int, PyObject *);

      static PyObject *RangeAppend(PyObject *, PyObject *);

      --- 1035,1045 ----
      static PyObject *RangeGetattr(PyObject *, char *);
      static PyObject *RangeRepr(PyObject *);

      ! static PyInt RangeLength(PyObject *);
      ! static PyObject *RangeItem(PyObject *, PyInt);
      ! static PyObject *RangeSlice(PyObject *, PyInt, PyInt);
      ! static PyInt RangeAssItem(PyObject *, PyInt, PyObject *);
      ! static PyInt RangeAssSlice(PyObject *, PyInt, PyInt, PyObject *);

      static PyObject *RangeAppend(PyObject *, PyObject *);

      ***************
      *** 1029,1043 ****
      * -------------------------------------------
      */

      ! static int WinListLength(PyObject *);
      ! static PyObject *WinListItem(PyObject *, int);

      /* Buffer list type - Implementation functions
      * -------------------------------------------
      */

      ! static int BufListLength(PyObject *);
      ! static PyObject *BufListItem(PyObject *, int);

      /* Current objects type - Implementation functions
      * -----------------------------------------------
      --- 1047,1061 ----
      * -------------------------------------------
      */

      ! static PyInt WinListLength(PyObject *);
      ! static PyObject *WinListItem(PyObject *, PyInt);

      /* Buffer list type - Implementation functions
      * -------------------------------------------
      */

      ! static PyInt BufListLength(PyObject *);
      ! static PyObject *BufListItem(PyObject *, PyInt);

      /* Current objects type - Implementation functions
      * -----------------------------------------------
      ***************
      *** 1130,1135 ****
      --- 1148,1163 ----
      result = Py_BuildValue("s", buf);
      PyDict_SetItemString(lookupDict, ptrBuf, result);
      }
      + #ifdef FEAT_FLOAT
      + else if (our_tv->v_type == VAR_FLOAT)
      + {
      + char buf[NUMBUFLEN];
      +
      + sprintf(buf, "%f", our_tv->vval.v_float);
      + result = Py_BuildValue("s", buf);
      + PyDict_SetItemString(lookupDict, ptrBuf, result);
      + }
      + #endif
      else if (our_tv->v_type == VAR_LIST)
      {
      list_T *list = our_tv->vval.v_list;
      ***************
      *** 1245,1251 ****
      }

      static PyObject *
      ! RBItem(BufferObject *self, int n, int start, int end)
      {
      if (CheckBuffer(self))
      return NULL;
      --- 1273,1279 ----
      }

      static PyObject *
      ! RBItem(BufferObject *self, PyInt n, int start, int end)
      {
      if (CheckBuffer(self))
      return NULL;
      ***************
      *** 1260,1268 ****
      }

      static PyObject *
      ! RBSlice(BufferObject *self, int lo, int hi, int start, int end)
      {
      ! int size;

      if (CheckBuffer(self))
      return NULL;
      --- 1288,1296 ----
      }

      static PyObject *
      ! RBSlice(BufferObject *self, PyInt lo, PyInt hi, int start, int end)
      {
      ! PyInt size;

      if (CheckBuffer(self))
      return NULL;
      ***************
      *** 1283,1290 ****
      return GetBufferLineList(self->buf, lo+start, hi+start);
      }

      ! static int
      ! RBAssItem(BufferObject *self, int n, PyObject *val, int start, int end, int *new_end)
      {
      int len_change;

      --- 1311,1318 ----
      return GetBufferLineList(self->buf, lo+start, hi+start);
      }

      ! static PyInt
      ! RBAssItem(BufferObject *self, PyInt n, PyObject *val, int start, int end, int *new_end)
      {
      int len_change;

      ***************
      *** 1306,1313 ****
      return 0;
      }

      ! static int
      ! RBAssSlice(BufferObject *self, int lo, int hi, PyObject *val, int start, int end, int *new_end)
      {
      int size;
      int len_change;
      --- 1334,1341 ----
      return 0;
      }

      ! static PyInt
      ! RBAssSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, int start, int end, int *new_end)
      {
      int size;
      int len_change;
      ***************
      *** 1384,1396 ****
      };

      static PySequenceMethods BufferAsSeq = {
      ! (inquiry) BufferLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */
      ! (intargfunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */
      ! (intargfunc) BufferItem, /* sq_item, x[i] */
      ! (intintargfunc) BufferSlice, /* sq_slice, x[i:j] */
      ! (intobjargproc) BufferAssItem, /* sq_ass_item, x[i]=v */
      ! (intintobjargproc) BufferAssSlice, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject BufferType = {
      --- 1412,1424 ----
      };

      static PySequenceMethods BufferAsSeq = {
      ! (PyInquiry) BufferLength, /* sq_length, len(x) */
      (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 */
      ! (PyIntIntObjArgProc) BufferAssSlice, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject BufferType = {
      ***************
      *** 1516,1522 ****

      /******************/

      ! static int
      BufferLength(PyObject *self)
      {
      /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
      --- 1544,1550 ----

      /******************/

      ! static PyInt
      BufferLength(PyObject *self)
      {
      /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
      ***************
      *** 1527,1555 ****
      }

      static PyObject *
      ! BufferItem(PyObject *self, int n)
      {
      return RBItem((BufferObject *)(self), n, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
      }

      static PyObject *
      ! BufferSlice(PyObject *self, int lo, int hi)
      {
      return RBSlice((BufferObject *)(self), lo, hi, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
      }

      ! static int
      ! BufferAssItem(PyObject *self, int n, PyObject *val)
      {
      return RBAssItem((BufferObject *)(self), n, val, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
      NULL);
      }

      ! static int
      ! BufferAssSlice(PyObject *self, int lo, int hi, PyObject *val)
      {
      return RBAssSlice((BufferObject *)(self), lo, hi, val, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
      --- 1555,1583 ----
      }

      static PyObject *
      ! BufferItem(PyObject *self, PyInt n)
      {
      return RBItem((BufferObject *)(self), n, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
      }

      static PyObject *
      ! BufferSlice(PyObject *self, PyInt lo, PyInt hi)
      {
      return RBSlice((BufferObject *)(self), lo, hi, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
      }

      ! static PyInt
      ! BufferAssItem(PyObject *self, PyInt n, PyObject *val)
      {
      return RBAssItem((BufferObject *)(self), n, val, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
      NULL);
      }

      ! static PyInt
      ! BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
      {
      return RBAssSlice((BufferObject *)(self), lo, hi, val, 1,
      (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
      ***************
      *** 1627,1639 ****
      };

      static PySequenceMethods RangeAsSeq = {
      ! (inquiry) RangeLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* RangeConcat, */ /* sq_concat, x+y */
      ! (intargfunc) 0, /* RangeRepeat, */ /* sq_repeat, x*n */
      ! (intargfunc) RangeItem, /* sq_item, x[i] */
      ! (intintargfunc) RangeSlice, /* sq_slice, x[i:j] */
      ! (intobjargproc) RangeAssItem, /* sq_ass_item, x[i]=v */
      ! (intintobjargproc) RangeAssSlice, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject RangeType = {
      --- 1655,1667 ----
      };

      static PySequenceMethods RangeAsSeq = {
      ! (PyInquiry) RangeLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* RangeConcat, */ /* sq_concat, x+y */
      ! (PyIntArgFunc) 0, /* RangeRepeat, */ /* sq_repeat, x*n */
      ! (PyIntArgFunc) RangeItem, /* sq_item, x[i] */
      ! (PyIntIntArgFunc) RangeSlice, /* sq_slice, x[i:j] */
      ! (PyIntObjArgProc) RangeAssItem, /* sq_ass_item, x[i]=v */
      ! (PyIntIntObjArgProc) RangeAssSlice, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject RangeType = {
      ***************
      *** 1738,1744 ****

      /****************/

      ! static int
      RangeLength(PyObject *self)
      {
      /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
      --- 1766,1772 ----

      /****************/

      ! static PyInt
      RangeLength(PyObject *self)
      {
      /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
      ***************
      *** 1749,1755 ****
      }

      static PyObject *
      ! RangeItem(PyObject *self, int n)
      {
      return RBItem(((RangeObject *)(self))->buf, n,
      ((RangeObject *)(self))->start,
      --- 1777,1783 ----
      }

      static PyObject *
      ! RangeItem(PyObject *self, PyInt n)
      {
      return RBItem(((RangeObject *)(self))->buf, n,
      ((RangeObject *)(self))->start,
      ***************
      *** 1757,1771 ****
      }

      static PyObject *
      ! RangeSlice(PyObject *self, int lo, int hi)
      {
      return RBSlice(((RangeObject *)(self))->buf, lo, hi,
      ((RangeObject *)(self))->start,
      ((RangeObject *)(self))->end);
      }

      ! static int
      ! RangeAssItem(PyObject *self, int n, PyObject *val)
      {
      return RBAssItem(((RangeObject *)(self))->buf, n, val,
      ((RangeObject *)(self))->start,
      --- 1785,1799 ----
      }

      static PyObject *
      ! RangeSlice(PyObject *self, PyInt lo, PyInt hi)
      {
      return RBSlice(((RangeObject *)(self))->buf, lo, hi,
      ((RangeObject *)(self))->start,
      ((RangeObject *)(self))->end);
      }

      ! static PyInt
      ! RangeAssItem(PyObject *self, PyInt n, PyObject *val)
      {
      return RBAssItem(((RangeObject *)(self))->buf, n, val,
      ((RangeObject *)(self))->start,
      ***************
      *** 1773,1780 ****
      &((RangeObject *)(self))->end);
      }

      ! static int
      ! RangeAssSlice(PyObject *self, int lo, int hi, PyObject *val)
      {
      return RBAssSlice(((RangeObject *)(self))->buf, lo, hi, val,
      ((RangeObject *)(self))->start,
      --- 1801,1808 ----
      &((RangeObject *)(self))->end);
      }

      ! static PyInt
      ! RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
      {
      return RBAssSlice(((RangeObject *)(self))->buf, lo, hi, val,
      ((RangeObject *)(self))->start,
      ***************
      *** 1801,1813 ****
      BufListObject;

      static PySequenceMethods BufListAsSeq = {
      ! (inquiry) BufListLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* sq_concat, x+y */
      ! (intargfunc) 0, /* sq_repeat, x*n */
      ! (intargfunc) BufListItem, /* sq_item, x[i] */
      ! (intintargfunc) 0, /* sq_slice, x[i:j] */
      ! (intobjargproc) 0, /* sq_ass_item, x[i]=v */
      ! (intintobjargproc) 0, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject BufListType = {
      --- 1829,1841 ----
      BufListObject;

      static PySequenceMethods BufListAsSeq = {
      ! (PyInquiry) BufListLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* sq_concat, x+y */
      ! (PyIntArgFunc) 0, /* sq_repeat, x*n */
      ! (PyIntArgFunc) BufListItem, /* sq_item, x[i] */
      ! (PyIntIntArgFunc) 0, /* sq_slice, x[i:j] */
      ! (PyIntObjArgProc) 0, /* sq_ass_item, x[i]=v */
      ! (PyIntIntObjArgProc) 0, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject BufListType = {
      ***************
      *** 1837,1843 ****
      */

      /*ARGSUSED*/
      ! static int
      BufListLength(PyObject *self)
      {
      buf_T *b = firstbuf;
      --- 1865,1871 ----
      */

      /*ARGSUSED*/
      ! static PyInt
      BufListLength(PyObject *self)
      {
      buf_T *b = firstbuf;
      ***************
      *** 1854,1860 ****

      /*ARGSUSED*/
      static PyObject *
      ! BufListItem(PyObject *self, int n)
      {
      buf_T *b;

      --- 1882,1888 ----

      /*ARGSUSED*/
      static PyObject *
      ! BufListItem(PyObject *self, PyInt n)
      {
      buf_T *b;

      ***************
      *** 2119,2131 ****
      WinListObject;

      static PySequenceMethods WinListAsSeq = {
      ! (inquiry) WinListLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* sq_concat, x+y */
      ! (intargfunc) 0, /* sq_repeat, x*n */
      ! (intargfunc) WinListItem, /* sq_item, x[i] */
      ! (intintargfunc) 0, /* sq_slice, x[i:j] */
      ! (intobjargproc) 0, /* sq_ass_item, x[i]=v */
      ! (intintobjargproc) 0, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject WinListType = {
      --- 2147,2159 ----
      WinListObject;

      static PySequenceMethods WinListAsSeq = {
      ! (PyInquiry) WinListLength, /* sq_length, len(x) */
      (binaryfunc) 0, /* sq_concat, x+y */
      ! (PyIntArgFunc) 0, /* sq_repeat, x*n */
      ! (PyIntArgFunc) WinListItem, /* sq_item, x[i] */
      ! (PyIntIntArgFunc) 0, /* sq_slice, x[i:j] */
      ! (PyIntObjArgProc) 0, /* sq_ass_item, x[i]=v */
      ! (PyIntIntObjArgProc) 0, /* sq_ass_slice, x[i:j]=v */
      };

      static PyTypeObject WinListType = {
      ***************
      *** 2154,2160 ****
      /* Window list object - Implementation
      */
      /*ARGSUSED*/
      ! static int
      WinListLength(PyObject *self)
      {
      win_T *w = firstwin;
      --- 2182,2188 ----
      /* Window list object - Implementation
      */
      /*ARGSUSED*/
      ! static PyInt
      WinListLength(PyObject *self)
      {
      win_T *w = firstwin;
      ***************
      *** 2171,2177 ****

      /*ARGSUSED*/
      static PyObject *
      ! WinListItem(PyObject *self, int n)
      {
      win_T *w;

      --- 2199,2205 ----

      /*ARGSUSED*/
      static PyObject *
      ! WinListItem(PyObject *self, PyInt n)
      {
      win_T *w;

      ***************
      *** 2351,2360 ****
      * including, hi. The list is returned as a Python list of string objects.
      */
      static PyObject *
      ! GetBufferLineList(buf_T *buf, int lo, int hi)
      {
      ! int i;
      ! int n = hi - lo;
      PyObject *list = PyList_New(n);

      if (list == NULL)
      --- 2379,2388 ----
      * including, hi. The list is returned as a Python list of string objects.
      */
      static PyObject *
      ! GetBufferLineList(buf_T *buf, PyInt lo, PyInt hi)
      {
      ! PyInt i;
      ! PyInt n = hi - lo;
      PyObject *list = PyList_New(n);

      if (list == NULL)
      ***************
      *** 2517,2523 ****
      * is set to the change in the buffer length.
      */
      static int
      ! SetBufferLineList(buf_T *buf, int lo, int hi, PyObject *list, int *len_change)
      {
      /* First of all, we check the thpe of the supplied Python object.
      * There are three cases:
      --- 2545,2551 ----
      * is set to the change in the buffer length.
      */
      static int
      ! SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, int *len_change)
      {
      /* First of all, we check the thpe of the supplied Python object.
      * There are three cases:
      ***************
      *** 2527,2534 ****
      */
      if (list == Py_None || list == NULL)
      {
      ! int i;
      ! int n = hi - lo;
      buf_T *savebuf = curbuf;

      PyErr_Clear();
      --- 2555,2562 ----
      */
      if (list == Py_None || list == NULL)
      {
      ! PyInt i;
      ! PyInt n = hi - lo;
      buf_T *savebuf = curbuf;

      PyErr_Clear();
      ***************
      *** 2564,2572 ****
      }
      else if (PyList_Check(list))
      {
      ! int i;
      ! int new_len = PyList_Size(list);
      ! int old_len = hi - lo;
      int extra = 0; /* lines added to text, can be negative */
      char **array;
      buf_T *savebuf;
      --- 2592,2600 ----
      }
      else if (PyList_Check(list))
      {
      ! PyInt i;
      ! PyInt new_len = PyList_Size(list);
      ! PyInt old_len = hi - lo;
      int extra = 0; /* lines added to text, can be negative */
      char **array;
      buf_T *savebuf;
      ***************
      *** 2745,2752 ****
      }
      else if (PyList_Check(lines))
      {
      ! int i;
      ! int size = PyList_Size(lines);
      char **array;
      buf_T *savebuf;

      --- 2773,2780 ----
      }
      else if (PyList_Check(lines))
      {
      ! PyInt i;
      ! PyInt size = PyList_Size(lines);
      char **array;
      buf_T *savebuf;

      ***************
      *** 2831,2837 ****
      LineToString(const char *str)
      {
      PyObject *result;
      ! int len = strlen(str);
      char *p;

      /* Allocate an Python string object, with uninitialised contents. We
      --- 2859,2865 ----
      LineToString(const char *str)
      {
      PyObject *result;
      ! PyInt len = strlen(str);
      char *p;

      /* Allocate an Python string object, with uninitialised contents. We
      ***************
      *** 2871,2878 ****
      {
      const char *str;
      char *save;
      ! int len;
      ! int i;
      char *p;

      if (obj == NULL || !PyString_Check(obj))
      --- 2899,2906 ----
      {
      const char *str;
      char *save;
      ! PyInt len;
      ! PyInt i;
      char *p;

      if (obj == NULL || !PyString_Check(obj))
      *** ../vim-7.1.306/src/version.c Wed Jun 4 10:59:18 2008
      --- src/version.c Wed Jun 4 13:31:40 2008
      ***************
      *** 668,669 ****
      --- 673,676 ----
      { /* Add new patch number below this line */
      + /**/
      + 307,
      /**/

      --
      For humans, honesty is a matter of degree. Engineers are always honest in
      matters of technology and human relationships. That's why it's a good idea
      to keep engineers away from customers, romantic interests, and other people
      who can't handle the truth.
      (Scott Adams - The Dilbert principle)

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.