|
Karsten Hopp |
7221f6 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
7221f6 |
Subject: Patch 7.3.698
|
|
Karsten Hopp |
7221f6 |
Fcc: outbox
|
|
Karsten Hopp |
7221f6 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
7221f6 |
Mime-Version: 1.0
|
|
Karsten Hopp |
7221f6 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
7221f6 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
7221f6 |
------------
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
Patch 7.3.698
|
|
Karsten Hopp |
7221f6 |
Problem: Python 3 does not preserve state beween commands.
|
|
Karsten Hopp |
7221f6 |
Solution: Preserve the state. (Paul Ollis)
|
|
Karsten Hopp |
7221f6 |
Files: src/if_python.c, src/if_python3.c
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
*** ../vim-7.3.697/src/if_python.c 2012-10-14 05:20:05.000000000 +0200
|
|
Karsten Hopp |
7221f6 |
--- src/if_python.c 2012-10-21 01:44:10.000000000 +0200
|
|
Karsten Hopp |
7221f6 |
***************
|
|
Karsten Hopp |
7221f6 |
*** 740,748 ****
|
|
Karsten Hopp |
7221f6 |
#else
|
|
Karsten Hopp |
7221f6 |
PyMac_Initialize();
|
|
Karsten Hopp |
7221f6 |
#endif
|
|
Karsten Hopp |
7221f6 |
! /* Initialise threads and save the state using PyGILState_Ensure.
|
|
Karsten Hopp |
7221f6 |
! * Without this call, thread-specific state (such as the system trace
|
|
Karsten Hopp |
7221f6 |
! * hook), will be lost between invocations of Python code. */
|
|
Karsten Hopp |
7221f6 |
PyEval_InitThreads();
|
|
Karsten Hopp |
7221f6 |
pygilstate = PyGILState_Ensure();
|
|
Karsten Hopp |
7221f6 |
#ifdef DYNAMIC_PYTHON
|
|
Karsten Hopp |
7221f6 |
--- 740,749 ----
|
|
Karsten Hopp |
7221f6 |
#else
|
|
Karsten Hopp |
7221f6 |
PyMac_Initialize();
|
|
Karsten Hopp |
7221f6 |
#endif
|
|
Karsten Hopp |
7221f6 |
! /* Initialise threads, and save the state using PyGILState_Ensure.
|
|
Karsten Hopp |
7221f6 |
! * Without the call to PyGILState_Ensure, thread specific state (such
|
|
Karsten Hopp |
7221f6 |
! * as the system trace hook), will be lost between invocations of
|
|
Karsten Hopp |
7221f6 |
! * Python code. */
|
|
Karsten Hopp |
7221f6 |
PyEval_InitThreads();
|
|
Karsten Hopp |
7221f6 |
pygilstate = PyGILState_Ensure();
|
|
Karsten Hopp |
7221f6 |
#ifdef DYNAMIC_PYTHON
|
|
Karsten Hopp |
7221f6 |
*** ../vim-7.3.697/src/if_python3.c 2012-10-14 03:22:49.000000000 +0200
|
|
Karsten Hopp |
7221f6 |
--- src/if_python3.c 2012-10-21 01:44:37.000000000 +0200
|
|
Karsten Hopp |
7221f6 |
***************
|
|
Karsten Hopp |
7221f6 |
*** 731,738 ****
|
|
Karsten Hopp |
7221f6 |
#else
|
|
Karsten Hopp |
7221f6 |
PyMac_Initialize();
|
|
Karsten Hopp |
7221f6 |
#endif
|
|
Karsten Hopp |
7221f6 |
! /* initialise threads, must be after Py_Initialize() */
|
|
Karsten Hopp |
7221f6 |
PyEval_InitThreads();
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
#ifdef DYNAMIC_PYTHON3
|
|
Karsten Hopp |
7221f6 |
get_py3_exceptions();
|
|
Karsten Hopp |
7221f6 |
--- 731,742 ----
|
|
Karsten Hopp |
7221f6 |
#else
|
|
Karsten Hopp |
7221f6 |
PyMac_Initialize();
|
|
Karsten Hopp |
7221f6 |
#endif
|
|
Karsten Hopp |
7221f6 |
! /* Initialise threads, and save the state using PyGILState_Ensure.
|
|
Karsten Hopp |
7221f6 |
! * Without the call to PyGILState_Ensure, thread specific state (such
|
|
Karsten Hopp |
7221f6 |
! * as the system trace hook), will be lost between invocations of
|
|
Karsten Hopp |
7221f6 |
! * Python code. */
|
|
Karsten Hopp |
7221f6 |
PyEval_InitThreads();
|
|
Karsten Hopp |
7221f6 |
+ pygilstate = PyGILState_Ensure();
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
#ifdef DYNAMIC_PYTHON3
|
|
Karsten Hopp |
7221f6 |
get_py3_exceptions();
|
|
Karsten Hopp |
7221f6 |
*** ../vim-7.3.697/src/version.c 2012-10-21 01:40:24.000000000 +0200
|
|
Karsten Hopp |
7221f6 |
--- src/version.c 2012-10-21 01:42:44.000000000 +0200
|
|
Karsten Hopp |
7221f6 |
***************
|
|
Karsten Hopp |
7221f6 |
*** 721,722 ****
|
|
Karsten Hopp |
7221f6 |
--- 721,724 ----
|
|
Karsten Hopp |
7221f6 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
7221f6 |
+ /**/
|
|
Karsten Hopp |
7221f6 |
+ 698,
|
|
Karsten Hopp |
7221f6 |
/**/
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
--
|
|
Karsten Hopp |
7221f6 |
ALL: A witch! A witch!
|
|
Karsten Hopp |
7221f6 |
WITCH: It's a fair cop.
|
|
Karsten Hopp |
7221f6 |
ALL: Burn her! Burn her! Let's make her into a ladder.
|
|
Karsten Hopp |
7221f6 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
7221f6 |
|
|
Karsten Hopp |
7221f6 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
7221f6 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
7221f6 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
7221f6 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|