jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.111

3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.111
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.111
3ef2ca
Problem:    Memory leak in Python OptionsAssItem. (Ken Takata)
3ef2ca
Solution:   Call Py_XDECREF() where needed. (ZyX)
3ef2ca
Files:	    src/if_py_both.h
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.110/src/if_py_both.h	2013-11-28 17:04:38.000000000 +0100
3ef2ca
--- src/if_py_both.h	2013-12-07 14:23:00.000000000 +0100
3ef2ca
***************
3ef2ca
*** 3005,3015 ****
3ef2ca
      else
3ef2ca
      {
3ef2ca
  	char_u		*val;
3ef2ca
! 	PyObject	*todecref;
3ef2ca
  
3ef2ca
! 	if ((val = StringToChars(valObject, &todecref)))
3ef2ca
  	    ret = set_option_value_for(key, 0, val, opt_flags,
3ef2ca
  				    self->opt_type, self->from);
3ef2ca
  	else
3ef2ca
  	    ret = -1;
3ef2ca
      }
3ef2ca
--- 3005,3018 ----
3ef2ca
      else
3ef2ca
      {
3ef2ca
  	char_u		*val;
3ef2ca
! 	PyObject	*todecref2;
3ef2ca
  
3ef2ca
! 	if ((val = StringToChars(valObject, &todecref2)))
3ef2ca
! 	{
3ef2ca
  	    ret = set_option_value_for(key, 0, val, opt_flags,
3ef2ca
  				    self->opt_type, self->from);
3ef2ca
+ 	    Py_XDECREF(todecref2);
3ef2ca
+ 	}
3ef2ca
  	else
3ef2ca
  	    ret = -1;
3ef2ca
      }
3ef2ca
*** ../vim-7.4.110/src/version.c	2013-11-28 19:27:18.000000000 +0100
3ef2ca
--- src/version.c	2013-12-07 14:24:16.000000000 +0100
3ef2ca
***************
3ef2ca
*** 740,741 ****
3ef2ca
--- 740,743 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     111,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
How To Keep A Healthy Level Of Insanity:
3ef2ca
12. Sing along at the opera.
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    ///