|
Karsten Hopp |
384c58 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
384c58 |
Subject: Patch 7.4.228
|
|
Karsten Hopp |
384c58 |
Fcc: outbox
|
|
Karsten Hopp |
384c58 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
384c58 |
Mime-Version: 1.0
|
|
Karsten Hopp |
384c58 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
384c58 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
384c58 |
------------
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
Patch 7.4.228
|
|
Karsten Hopp |
384c58 |
Problem: Compiler warnings when building with Python 3.2.
|
|
Karsten Hopp |
384c58 |
Solution: Make type cast depend on Python version. (Ken Takata)
|
|
Karsten Hopp |
384c58 |
Files: src/if_py_both.h, src/if_python.c, src/if_python3.c
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
*** ../vim-7.4.227/src/if_py_both.h 2014-03-08 16:13:39.115462069 +0100
|
|
Karsten Hopp |
384c58 |
--- src/if_py_both.h 2014-03-30 15:58:40.948518929 +0200
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 2328,2334 ****
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
|
|
Karsten Hopp |
384c58 |
&start, &stop, &step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
return NULL;
|
|
Karsten Hopp |
384c58 |
return ListSlice(self, start, step, slicelen);
|
|
Karsten Hopp |
384c58 |
--- 2328,2334 ----
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, ListLength(self),
|
|
Karsten Hopp |
384c58 |
&start, &stop, &step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
return NULL;
|
|
Karsten Hopp |
384c58 |
return ListSlice(self, start, step, slicelen);
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 2618,2624 ****
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject *)idx, ListLength(self),
|
|
Karsten Hopp |
384c58 |
&start, &stop, &step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
return -1;
|
|
Karsten Hopp |
384c58 |
return ListAssSlice(self, start, step, slicelen,
|
|
Karsten Hopp |
384c58 |
--- 2618,2624 ----
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject_T *)idx, ListLength(self),
|
|
Karsten Hopp |
384c58 |
&start, &stop, &step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
return -1;
|
|
Karsten Hopp |
384c58 |
return ListAssSlice(self, start, step, slicelen,
|
|
Karsten Hopp |
384c58 |
*** ../vim-7.4.227/src/if_python.c 2014-02-23 22:52:33.368764715 +0100
|
|
Karsten Hopp |
384c58 |
--- src/if_python.c 2014-03-30 15:58:35.768518850 +0200
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 803,808 ****
|
|
Karsten Hopp |
384c58 |
--- 803,810 ----
|
|
Karsten Hopp |
384c58 |
# define PY_STRSAVE(s) ((char_u *) py_memsave(s, STRLEN(s) + 1))
|
|
Karsten Hopp |
384c58 |
#endif
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
+ typedef PySliceObject PySliceObject_T;
|
|
Karsten Hopp |
384c58 |
+
|
|
Karsten Hopp |
384c58 |
/*
|
|
Karsten Hopp |
384c58 |
* Include the code shared with if_python3.c
|
|
Karsten Hopp |
384c58 |
*/
|
|
Karsten Hopp |
384c58 |
*** ../vim-7.4.227/src/if_python3.c 2014-01-14 19:35:49.000000000 +0100
|
|
Karsten Hopp |
384c58 |
--- src/if_python3.c 2014-03-30 15:59:24.752519600 +0200
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 100,105 ****
|
|
Karsten Hopp |
384c58 |
--- 100,115 ----
|
|
Karsten Hopp |
384c58 |
#define PyIntArgFunc ssizeargfunc
|
|
Karsten Hopp |
384c58 |
#define PyIntObjArgProc ssizeobjargproc
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
+ /*
|
|
Karsten Hopp |
384c58 |
+ * PySlice_GetIndicesEx(): first argument type changed from PySliceObject
|
|
Karsten Hopp |
384c58 |
+ * to PyObject in Python 3.2 or later.
|
|
Karsten Hopp |
384c58 |
+ */
|
|
Karsten Hopp |
384c58 |
+ #if PY_VERSION_HEX >= 0x030200f0
|
|
Karsten Hopp |
384c58 |
+ typedef PyObject PySliceObject_T;
|
|
Karsten Hopp |
384c58 |
+ #else
|
|
Karsten Hopp |
384c58 |
+ typedef PySliceObject PySliceObject_T;
|
|
Karsten Hopp |
384c58 |
+ #endif
|
|
Karsten Hopp |
384c58 |
+
|
|
Karsten Hopp |
384c58 |
#if defined(DYNAMIC_PYTHON3) || defined(PROTO)
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
# ifndef WIN3264
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 294,300 ****
|
|
Karsten Hopp |
384c58 |
static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
|
|
Karsten Hopp |
384c58 |
static int (*py3_PyMapping_Check)(PyObject *);
|
|
Karsten Hopp |
384c58 |
static PyObject* (*py3_PyMapping_Keys)(PyObject *);
|
|
Karsten Hopp |
384c58 |
! static int (*py3_PySlice_GetIndicesEx)(PySliceObject *r, Py_ssize_t length,
|
|
Karsten Hopp |
384c58 |
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
|
|
Karsten Hopp |
384c58 |
Py_ssize_t *slicelen);
|
|
Karsten Hopp |
384c58 |
static PyObject* (*py3_PyErr_NoMemory)(void);
|
|
Karsten Hopp |
384c58 |
--- 304,310 ----
|
|
Karsten Hopp |
384c58 |
static PyObject* (*py3_PyTuple_GetItem)(PyObject *, Py_ssize_t);
|
|
Karsten Hopp |
384c58 |
static int (*py3_PyMapping_Check)(PyObject *);
|
|
Karsten Hopp |
384c58 |
static PyObject* (*py3_PyMapping_Keys)(PyObject *);
|
|
Karsten Hopp |
384c58 |
! static int (*py3_PySlice_GetIndicesEx)(PySliceObject_T *r, Py_ssize_t length,
|
|
Karsten Hopp |
384c58 |
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
|
|
Karsten Hopp |
384c58 |
Py_ssize_t *slicelen);
|
|
Karsten Hopp |
384c58 |
static PyObject* (*py3_PyErr_NoMemory)(void);
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 1190,1196 ****
|
|
Karsten Hopp |
384c58 |
if (CheckBuffer((BufferObject *) self))
|
|
Karsten Hopp |
384c58 |
return NULL;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
|
Karsten Hopp |
384c58 |
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
--- 1200,1206 ----
|
|
Karsten Hopp |
384c58 |
if (CheckBuffer((BufferObject *) self))
|
|
Karsten Hopp |
384c58 |
return NULL;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
|
|
Karsten Hopp |
384c58 |
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 1222,1228 ****
|
|
Karsten Hopp |
384c58 |
if (CheckBuffer((BufferObject *) self))
|
|
Karsten Hopp |
384c58 |
return -1;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
|
Karsten Hopp |
384c58 |
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
--- 1232,1238 ----
|
|
Karsten Hopp |
384c58 |
if (CheckBuffer((BufferObject *) self))
|
|
Karsten Hopp |
384c58 |
return -1;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
|
|
Karsten Hopp |
384c58 |
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 1306,1312 ****
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
|
Karsten Hopp |
384c58 |
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
--- 1316,1322 ----
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
|
|
Karsten Hopp |
384c58 |
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 1333,1339 ****
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
|
Karsten Hopp |
384c58 |
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
--- 1343,1349 ----
|
|
Karsten Hopp |
384c58 |
{
|
|
Karsten Hopp |
384c58 |
Py_ssize_t start, stop, step, slicelen;
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
! if (PySlice_GetIndicesEx((PySliceObject_T *)idx,
|
|
Karsten Hopp |
384c58 |
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
|
|
Karsten Hopp |
384c58 |
&start, &stop,
|
|
Karsten Hopp |
384c58 |
&step, &slicelen) < 0)
|
|
Karsten Hopp |
384c58 |
*** ../vim-7.4.227/src/version.c 2014-03-28 21:58:17.878256914 +0100
|
|
Karsten Hopp |
384c58 |
--- src/version.c 2014-03-30 15:52:27.784513211 +0200
|
|
Karsten Hopp |
384c58 |
***************
|
|
Karsten Hopp |
384c58 |
*** 736,737 ****
|
|
Karsten Hopp |
384c58 |
--- 736,739 ----
|
|
Karsten Hopp |
384c58 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
384c58 |
+ /**/
|
|
Karsten Hopp |
384c58 |
+ 228,
|
|
Karsten Hopp |
384c58 |
/**/
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
--
|
|
Karsten Hopp |
384c58 |
The average life of an organization chart is six months. You can safely
|
|
Karsten Hopp |
384c58 |
ignore any order from your boss that would take six months to complete.
|
|
Karsten Hopp |
384c58 |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
384c58 |
|
|
Karsten Hopp |
384c58 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
384c58 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
384c58 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
384c58 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|