Karsten Hopp f66c0c
To: vim-dev@vim.org
Karsten Hopp f66c0c
Subject: Patch 7.0.112
Karsten Hopp f66c0c
Fcc: outbox
Karsten Hopp f66c0c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f66c0c
Mime-Version: 1.0
Karsten Hopp f66c0c
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp f66c0c
Content-Transfer-Encoding: 8bit
Karsten Hopp f66c0c
------------
Karsten Hopp f66c0c
Karsten Hopp f66c0c
Patch 7.0.112
Karsten Hopp f66c0c
Problem:    Python interface does not work with Python 2.5.
Karsten Hopp f66c0c
Solution:   Change PyMem_DEL() to Py_DECREF(). (Sumner Hayes)
Karsten Hopp f66c0c
Files:	    src/if_python.c
Karsten Hopp f66c0c
Karsten Hopp f66c0c
Karsten Hopp f66c0c
*** ../vim-7.0.111/src/if_python.c	Sun Apr 30 20:48:37 2006
Karsten Hopp f66c0c
--- src/if_python.c	Fri Sep 22 15:08:33 2006
Karsten Hopp f66c0c
***************
Karsten Hopp f66c0c
*** 1463,1469 ****
Karsten Hopp f66c0c
      if (this->buf && this->buf != INVALID_BUFFER_VALUE)
Karsten Hopp f66c0c
  	this->buf->b_python_ref = NULL;
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
!     PyMem_DEL(self);
Karsten Hopp f66c0c
  }
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
      static PyObject *
Karsten Hopp f66c0c
--- 1463,1469 ----
Karsten Hopp f66c0c
      if (this->buf && this->buf != INVALID_BUFFER_VALUE)
Karsten Hopp f66c0c
  	this->buf->b_python_ref = NULL;
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
!     Py_DECREF(self);
Karsten Hopp f66c0c
  }
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
      static PyObject *
Karsten Hopp f66c0c
***************
Karsten Hopp f66c0c
*** 1674,1680 ****
Karsten Hopp f66c0c
      bufr = (BufferObject *)BufferNew(buf);
Karsten Hopp f66c0c
      if (bufr == NULL)
Karsten Hopp f66c0c
      {
Karsten Hopp f66c0c
! 	PyMem_DEL(self);
Karsten Hopp f66c0c
  	return NULL;
Karsten Hopp f66c0c
      }
Karsten Hopp f66c0c
      Py_INCREF(bufr);
Karsten Hopp f66c0c
--- 1674,1680 ----
Karsten Hopp f66c0c
      bufr = (BufferObject *)BufferNew(buf);
Karsten Hopp f66c0c
      if (bufr == NULL)
Karsten Hopp f66c0c
      {
Karsten Hopp f66c0c
! 	Py_DECREF(self);
Karsten Hopp f66c0c
  	return NULL;
Karsten Hopp f66c0c
      }
Karsten Hopp f66c0c
      Py_INCREF(bufr);
Karsten Hopp f66c0c
***************
Karsten Hopp f66c0c
*** 1690,1696 ****
Karsten Hopp f66c0c
  RangeDestructor(PyObject *self)
Karsten Hopp f66c0c
  {
Karsten Hopp f66c0c
      Py_DECREF(((RangeObject *)(self))->buf);
Karsten Hopp f66c0c
!     PyMem_DEL(self);
Karsten Hopp f66c0c
  }
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
      static PyObject *
Karsten Hopp f66c0c
--- 1690,1696 ----
Karsten Hopp f66c0c
  RangeDestructor(PyObject *self)
Karsten Hopp f66c0c
  {
Karsten Hopp f66c0c
      Py_DECREF(((RangeObject *)(self))->buf);
Karsten Hopp f66c0c
!     Py_DECREF(self);
Karsten Hopp f66c0c
  }
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
      static PyObject *
Karsten Hopp f66c0c
***************
Karsten Hopp f66c0c
*** 1944,1950 ****
Karsten Hopp f66c0c
      if (this->win && this->win != INVALID_WINDOW_VALUE)
Karsten Hopp f66c0c
  	this->win->w_python_ref = NULL;
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
!     PyMem_DEL(self);
Karsten Hopp f66c0c
  }
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
      static int
Karsten Hopp f66c0c
--- 1944,1950 ----
Karsten Hopp f66c0c
      if (this->win && this->win != INVALID_WINDOW_VALUE)
Karsten Hopp f66c0c
  	this->win->w_python_ref = NULL;
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
!     Py_DECREF(self);
Karsten Hopp f66c0c
  }
Karsten Hopp f66c0c
  
Karsten Hopp f66c0c
      static int
Karsten Hopp f66c0c
*** ../vim-7.0.111/src/version.c	Tue Oct  3 14:43:31 2006
Karsten Hopp f66c0c
--- src/version.c	Tue Oct  3 14:46:10 2006
Karsten Hopp f66c0c
***************
Karsten Hopp f66c0c
*** 668,669 ****
Karsten Hopp f66c0c
--- 668,671 ----
Karsten Hopp f66c0c
  {   /* Add new patch number below this line */
Karsten Hopp f66c0c
+ /**/
Karsten Hopp f66c0c
+     112,
Karsten Hopp f66c0c
  /**/
Karsten Hopp f66c0c
Karsten Hopp f66c0c
-- 
Karsten Hopp f66c0c
A salesperson says:            Translation:
Karsten Hopp f66c0c
"backward compatible"          Old technology
Karsten Hopp f66c0c
"Premium"                      Overpriced
Karsten Hopp f66c0c
"Can't keep it on the shelf"   Unavailable
Karsten Hopp f66c0c
"Stands alone"                 Piece of shit
Karsten Hopp f66c0c
"Proprietary"                  Incompatible
Karsten Hopp f66c0c
				(Scott Adams - The Dilbert principle)
Karsten Hopp f66c0c
Karsten Hopp f66c0c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f66c0c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f66c0c
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp f66c0c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///