jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.111

dcaee6
To: vim_dev@googlegroups.com
dcaee6
Subject: Patch 7.4.111
dcaee6
Fcc: outbox
dcaee6
From: Bram Moolenaar <Bram@moolenaar.net>
dcaee6
Mime-Version: 1.0
dcaee6
Content-Type: text/plain; charset=UTF-8
dcaee6
Content-Transfer-Encoding: 8bit
dcaee6
------------
dcaee6
dcaee6
Patch 7.4.111
dcaee6
Problem:    Memory leak in Python OptionsAssItem. (Ken Takata)
dcaee6
Solution:   Call Py_XDECREF() where needed. (ZyX)
dcaee6
Files:	    src/if_py_both.h
dcaee6
dcaee6
dcaee6
*** ../vim-7.4.110/src/if_py_both.h	2013-11-28 17:04:38.000000000 +0100
dcaee6
--- src/if_py_both.h	2013-12-07 14:23:00.000000000 +0100
dcaee6
***************
dcaee6
*** 3005,3015 ****
dcaee6
      else
dcaee6
      {
dcaee6
  	char_u		*val;
dcaee6
! 	PyObject	*todecref;
dcaee6
  
dcaee6
! 	if ((val = StringToChars(valObject, &todecref)))
dcaee6
  	    ret = set_option_value_for(key, 0, val, opt_flags,
dcaee6
  				    self->opt_type, self->from);
dcaee6
  	else
dcaee6
  	    ret = -1;
dcaee6
      }
dcaee6
--- 3005,3018 ----
dcaee6
      else
dcaee6
      {
dcaee6
  	char_u		*val;
dcaee6
! 	PyObject	*todecref2;
dcaee6
  
dcaee6
! 	if ((val = StringToChars(valObject, &todecref2)))
dcaee6
! 	{
dcaee6
  	    ret = set_option_value_for(key, 0, val, opt_flags,
dcaee6
  				    self->opt_type, self->from);
dcaee6
+ 	    Py_XDECREF(todecref2);
dcaee6
+ 	}
dcaee6
  	else
dcaee6
  	    ret = -1;
dcaee6
      }
dcaee6
*** ../vim-7.4.110/src/version.c	2013-11-28 19:27:18.000000000 +0100
dcaee6
--- src/version.c	2013-12-07 14:24:16.000000000 +0100
dcaee6
***************
dcaee6
*** 740,741 ****
dcaee6
--- 740,743 ----
dcaee6
  {   /* Add new patch number below this line */
dcaee6
+ /**/
dcaee6
+     111,
dcaee6
  /**/
dcaee6
dcaee6
-- 
dcaee6
How To Keep A Healthy Level Of Insanity:
dcaee6
12. Sing along at the opera.
dcaee6
dcaee6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
dcaee6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
dcaee6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
dcaee6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///