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