Karsten Hopp 504d61
To: vim_dev@googlegroups.com
Karsten Hopp 504d61
Subject: Patch 7.4.153
Karsten Hopp 504d61
Fcc: outbox
Karsten Hopp 504d61
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 504d61
Mime-Version: 1.0
Karsten Hopp 504d61
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 504d61
Content-Transfer-Encoding: 8bit
Karsten Hopp 504d61
------------
Karsten Hopp 504d61
Karsten Hopp 504d61
Patch 7.4.153
Karsten Hopp 504d61
Problem:    Compiler warning for pointer type.
Karsten Hopp 504d61
Solution:   Add type cast.
Karsten Hopp 504d61
Files:	    src/if_py_both.h, src/if_python.c, src/if_python3.c
Karsten Hopp 504d61
Karsten Hopp 504d61
Karsten Hopp 504d61
*** ../vim-7.4.152/src/if_py_both.h	2014-01-14 16:54:53.000000000 +0100
Karsten Hopp 504d61
--- src/if_py_both.h	2014-01-14 18:54:47.000000000 +0100
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 2326,2332 ****
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx(idx, ListLength(self),
Karsten Hopp 504d61
  				 &start, &stop, &step, &slicelen) < 0)
Karsten Hopp 504d61
  	    return NULL;
Karsten Hopp 504d61
  	return ListSlice(self, start, step, slicelen);
Karsten Hopp 504d61
--- 2326,2332 ----
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
Karsten Hopp 504d61
  				 &start, &stop, &step, &slicelen) < 0)
Karsten Hopp 504d61
  	    return NULL;
Karsten Hopp 504d61
  	return ListSlice(self, start, step, slicelen);
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 2616,2622 ****
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx(idx, ListLength(self),
Karsten Hopp 504d61
  				 &start, &stop, &step, &slicelen) < 0)
Karsten Hopp 504d61
  	    return -1;
Karsten Hopp 504d61
  	return ListAssSlice(self, start, step, slicelen,
Karsten Hopp 504d61
--- 2616,2622 ----
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
Karsten Hopp 504d61
  				 &start, &stop, &step, &slicelen) < 0)
Karsten Hopp 504d61
  	    return -1;
Karsten Hopp 504d61
  	return ListAssSlice(self, start, step, slicelen,
Karsten Hopp 504d61
*** ../vim-7.4.152/src/if_python.c	2014-01-14 16:36:40.000000000 +0100
Karsten Hopp 504d61
--- src/if_python.c	2014-01-14 18:56:41.000000000 +0100
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 343,349 ****
Karsten Hopp 504d61
  static PyInt(*dll_PyTuple_Size)(PyObject *);
Karsten Hopp 504d61
  static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt);
Karsten Hopp 504d61
  static PyTypeObject* dll_PyTuple_Type;
Karsten Hopp 504d61
! static int (*dll_PySlice_GetIndicesEx)(PyObject *r, PyInt length,
Karsten Hopp 504d61
  		     PyInt *start, PyInt *stop, PyInt *step,
Karsten Hopp 504d61
  		     PyInt *slicelen);
Karsten Hopp 504d61
  static PyObject*(*dll_PyImport_ImportModule)(const char *);
Karsten Hopp 504d61
--- 343,349 ----
Karsten Hopp 504d61
  static PyInt(*dll_PyTuple_Size)(PyObject *);
Karsten Hopp 504d61
  static PyObject*(*dll_PyTuple_GetItem)(PyObject *, PyInt);
Karsten Hopp 504d61
  static PyTypeObject* dll_PyTuple_Type;
Karsten Hopp 504d61
! static int (*dll_PySlice_GetIndicesEx)(PySliceObject *r, PyInt length,
Karsten Hopp 504d61
  		     PyInt *start, PyInt *stop, PyInt *step,
Karsten Hopp 504d61
  		     PyInt *slicelen);
Karsten Hopp 504d61
  static PyObject*(*dll_PyImport_ImportModule)(const char *);
Karsten Hopp 504d61
*** ../vim-7.4.152/src/if_python3.c	2014-01-14 16:36:40.000000000 +0100
Karsten Hopp 504d61
--- src/if_python3.c	2014-01-14 18:58:19.000000000 +0100
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 294,300 ****
Karsten Hopp 504d61
  static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
Karsten Hopp 504d61
  static int (*py3_PyMapping_Check)(PyObject *);
Karsten Hopp 504d61
  static PyObject* (*py3_PyMapping_Keys)(PyObject *);
Karsten Hopp 504d61
! static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length,
Karsten Hopp 504d61
  		     Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
Karsten Hopp 504d61
  		     Py_ssize_t *slicelen);
Karsten Hopp 504d61
  static PyObject* (*py3_PyErr_NoMemory)(void);
Karsten Hopp 504d61
--- 294,300 ----
Karsten Hopp 504d61
  static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
Karsten Hopp 504d61
  static int (*py3_PyMapping_Check)(PyObject *);
Karsten Hopp 504d61
  static PyObject* (*py3_PyMapping_Keys)(PyObject *);
Karsten Hopp 504d61
! static int (*py3_PySlice_GetIndicesEx)(PySliceObject *r, Py_ssize_t length,
Karsten Hopp 504d61
  		     Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
Karsten Hopp 504d61
  		     Py_ssize_t *slicelen);
Karsten Hopp 504d61
  static PyObject* (*py3_PyErr_NoMemory)(void);
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 1190,1196 ****
Karsten Hopp 504d61
  	if (CheckBuffer((BufferObject *) self))
Karsten Hopp 504d61
  	    return NULL;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PyObject *)idx,
Karsten Hopp 504d61
  	      (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
Karsten Hopp 504d61
  	      &start, &stop,
Karsten Hopp 504d61
  	      &step, &slicelen) < 0)
Karsten Hopp 504d61
--- 1190,1196 ----
Karsten Hopp 504d61
  	if (CheckBuffer((BufferObject *) self))
Karsten Hopp 504d61
  	    return NULL;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PySliceObject *)idx,
Karsten Hopp 504d61
  	      (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
Karsten Hopp 504d61
  	      &start, &stop,
Karsten Hopp 504d61
  	      &step, &slicelen) < 0)
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 1222,1228 ****
Karsten Hopp 504d61
  	if (CheckBuffer((BufferObject *) self))
Karsten Hopp 504d61
  	    return -1;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PyObject *)idx,
Karsten Hopp 504d61
  	      (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
Karsten Hopp 504d61
  	      &start, &stop,
Karsten Hopp 504d61
  	      &step, &slicelen) < 0)
Karsten Hopp 504d61
--- 1222,1228 ----
Karsten Hopp 504d61
  	if (CheckBuffer((BufferObject *) self))
Karsten Hopp 504d61
  	    return -1;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PySliceObject *)idx,
Karsten Hopp 504d61
  	      (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
Karsten Hopp 504d61
  	      &start, &stop,
Karsten Hopp 504d61
  	      &step, &slicelen) < 0)
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 1306,1312 ****
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PyObject *)idx,
Karsten Hopp 504d61
  		((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
Karsten Hopp 504d61
  		&start, &stop,
Karsten Hopp 504d61
  		&step, &slicelen) < 0)
Karsten Hopp 504d61
--- 1306,1312 ----
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PySliceObject *)idx,
Karsten Hopp 504d61
  		((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
Karsten Hopp 504d61
  		&start, &stop,
Karsten Hopp 504d61
  		&step, &slicelen) < 0)
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 1333,1339 ****
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PyObject *)idx,
Karsten Hopp 504d61
  		((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
Karsten Hopp 504d61
  		&start, &stop,
Karsten Hopp 504d61
  		&step, &slicelen) < 0)
Karsten Hopp 504d61
--- 1333,1339 ----
Karsten Hopp 504d61
      {
Karsten Hopp 504d61
  	Py_ssize_t start, stop, step, slicelen;
Karsten Hopp 504d61
  
Karsten Hopp 504d61
! 	if (PySlice_GetIndicesEx((PySliceObject *)idx,
Karsten Hopp 504d61
  		((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
Karsten Hopp 504d61
  		&start, &stop,
Karsten Hopp 504d61
  		&step, &slicelen) < 0)
Karsten Hopp 504d61
*** ../vim-7.4.152/src/version.c	2014-01-14 16:54:53.000000000 +0100
Karsten Hopp 504d61
--- src/version.c	2014-01-14 18:54:01.000000000 +0100
Karsten Hopp 504d61
***************
Karsten Hopp 504d61
*** 740,741 ****
Karsten Hopp 504d61
--- 740,743 ----
Karsten Hopp 504d61
  {   /* Add new patch number below this line */
Karsten Hopp 504d61
+ /**/
Karsten Hopp 504d61
+     153,
Karsten Hopp 504d61
  /**/
Karsten Hopp 504d61
Karsten Hopp 504d61
-- 
Karsten Hopp 504d61
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 504d61
161. You get up before the sun rises to check your e-mail, and you
Karsten Hopp 504d61
     find yourself in the very same chair long after the sun has set.
Karsten Hopp 504d61
Karsten Hopp 504d61
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 504d61
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 504d61
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 504d61
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///