Karsten Hopp 9476d1
To: vim_dev@googlegroups.com
Karsten Hopp 9476d1
Subject: Patch 7.3.497
Karsten Hopp 9476d1
Fcc: outbox
Karsten Hopp 9476d1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9476d1
Mime-Version: 1.0
Karsten Hopp 9476d1
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 9476d1
Content-Transfer-Encoding: 8bit
Karsten Hopp 9476d1
------------
Karsten Hopp 9476d1
Karsten Hopp 9476d1
Patch 7.3.497
Karsten Hopp 9476d1
Problem:    Crash when doing ":python print" and compiled with gcc and
Karsten Hopp 9476d1
	    the optimizer enabled.
Karsten Hopp 9476d1
Solution:   Avoid the crash, doesn't really fix the problem. (Christian
Karsten Hopp 9476d1
	    Brabandt)
Karsten Hopp 9476d1
Files:	    src/if_py_both.h
Karsten Hopp 9476d1
Karsten Hopp 9476d1
Karsten Hopp 9476d1
*** ../vim-7.3.496/src/if_py_both.h	2012-02-04 20:17:21.000000000 +0100
Karsten Hopp 9476d1
--- src/if_py_both.h	2012-04-20 13:24:31.000000000 +0200
Karsten Hopp 9476d1
***************
Karsten Hopp 9476d1
*** 77,82 ****
Karsten Hopp 9476d1
--- 77,87 ----
Karsten Hopp 9476d1
      if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len))
Karsten Hopp 9476d1
  	return NULL;
Karsten Hopp 9476d1
  
Karsten Hopp 9476d1
+     /* TODO: This works around a gcc optimizer problem and avoids Vim
Karsten Hopp 9476d1
+      * from crashing.  Should find a real solution. */
Karsten Hopp 9476d1
+     if (str == NULL)
Karsten Hopp 9476d1
+ 	return NULL;
Karsten Hopp 9476d1
+ 
Karsten Hopp 9476d1
      Py_BEGIN_ALLOW_THREADS
Karsten Hopp 9476d1
      Python_Lock_Vim();
Karsten Hopp 9476d1
      writer((writefn)(error ? emsg : msg), (char_u *)str, len);
Karsten Hopp 9476d1
*** ../vim-7.3.496/src/version.c	2012-04-13 19:11:16.000000000 +0200
Karsten Hopp 9476d1
--- src/version.c	2012-04-20 13:26:22.000000000 +0200
Karsten Hopp 9476d1
***************
Karsten Hopp 9476d1
*** 716,717 ****
Karsten Hopp 9476d1
--- 716,719 ----
Karsten Hopp 9476d1
  {   /* Add new patch number below this line */
Karsten Hopp 9476d1
+ /**/
Karsten Hopp 9476d1
+     497,
Karsten Hopp 9476d1
  /**/
Karsten Hopp 9476d1
Karsten Hopp 9476d1
-- 
Karsten Hopp 9476d1
There can't be a crisis today, my schedule is already full.
Karsten Hopp 9476d1
Karsten Hopp 9476d1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9476d1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9476d1
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 9476d1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///