Karsten Hopp d7a5bb
To: vim_dev@googlegroups.com
Karsten Hopp d7a5bb
Subject: Patch 7.3.691
Karsten Hopp d7a5bb
Fcc: outbox
Karsten Hopp d7a5bb
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d7a5bb
Mime-Version: 1.0
Karsten Hopp d7a5bb
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d7a5bb
Content-Transfer-Encoding: 8bit
Karsten Hopp d7a5bb
------------
Karsten Hopp d7a5bb
Karsten Hopp d7a5bb
Patch 7.3.691
Karsten Hopp d7a5bb
Problem:    State specific to the Python thread is discarded.
Karsten Hopp d7a5bb
Solution:   Keep state between threads. (Paul)
Karsten Hopp d7a5bb
Files:      src/if_python.c
Karsten Hopp d7a5bb
Karsten Hopp d7a5bb
Karsten Hopp d7a5bb
*** ../vim-7.3.690/src/if_python.c	2012-09-21 14:00:05.000000000 +0200
Karsten Hopp d7a5bb
--- src/if_python.c	2012-10-14 05:19:44.000000000 +0200
Karsten Hopp d7a5bb
***************
Karsten Hopp d7a5bb
*** 740,748 ****
Karsten Hopp d7a5bb
  #else
Karsten Hopp d7a5bb
  	PyMac_Initialize();
Karsten Hopp d7a5bb
  #endif
Karsten Hopp d7a5bb
! 	/* initialise threads */
Karsten Hopp d7a5bb
  	PyEval_InitThreads();
Karsten Hopp d7a5bb
! 
Karsten Hopp d7a5bb
  #ifdef DYNAMIC_PYTHON
Karsten Hopp d7a5bb
  	get_exceptions();
Karsten Hopp d7a5bb
  #endif
Karsten Hopp d7a5bb
--- 740,750 ----
Karsten Hopp d7a5bb
  #else
Karsten Hopp d7a5bb
  	PyMac_Initialize();
Karsten Hopp d7a5bb
  #endif
Karsten Hopp d7a5bb
! 	/* Initialise threads and save the state using PyGILState_Ensure.
Karsten Hopp d7a5bb
! 	 * Without this call, thread-specific state (such as the system trace
Karsten Hopp d7a5bb
! 	 * hook), will be lost between invocations of Python code.  */
Karsten Hopp d7a5bb
  	PyEval_InitThreads();
Karsten Hopp d7a5bb
! 	pygilstate = PyGILState_Ensure();
Karsten Hopp d7a5bb
  #ifdef DYNAMIC_PYTHON
Karsten Hopp d7a5bb
  	get_exceptions();
Karsten Hopp d7a5bb
  #endif
Karsten Hopp d7a5bb
*** ../vim-7.3.690/src/version.c	2012-10-14 04:35:16.000000000 +0200
Karsten Hopp d7a5bb
--- src/version.c	2012-10-14 05:14:35.000000000 +0200
Karsten Hopp d7a5bb
***************
Karsten Hopp d7a5bb
*** 721,722 ****
Karsten Hopp d7a5bb
--- 721,724 ----
Karsten Hopp d7a5bb
  {   /* Add new patch number below this line */
Karsten Hopp d7a5bb
+ /**/
Karsten Hopp d7a5bb
+     691,
Karsten Hopp d7a5bb
  /**/
Karsten Hopp d7a5bb
Karsten Hopp d7a5bb
-- 
Karsten Hopp d7a5bb
ARTHUR: The swallow may fly south with the sun, or the house martin or the
Karsten Hopp d7a5bb
        plover seek warmer hot lands in winter, yet these are not strangers to
Karsten Hopp d7a5bb
        our land.
Karsten Hopp d7a5bb
SOLDIER: Are you suggesting coconuts migrate?
Karsten Hopp d7a5bb
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp d7a5bb
Karsten Hopp d7a5bb
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d7a5bb
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d7a5bb
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d7a5bb
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///