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