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