1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Python 3 does not preserve state beween commands.
12 Solution: Preserve the state. (Paul Ollis)
13 Files: src/if_python.c, src/if_python3.c
16 *** ../vim-7.3.697/src/if_python.c 2012-10-14 05:20:05.000000000 +0200
17 --- src/if_python.c 2012-10-21 01:44:10.000000000 +0200
23 ! /* Initialise threads and save the state using PyGILState_Ensure.
24 ! * Without this call, thread-specific state (such as the system trace
25 ! * hook), will be lost between invocations of Python code. */
27 pygilstate = PyGILState_Ensure();
33 ! /* Initialise threads, and save the state using PyGILState_Ensure.
34 ! * Without the call to PyGILState_Ensure, thread specific state (such
35 ! * as the system trace hook), will be lost between invocations of
38 pygilstate = PyGILState_Ensure();
40 *** ../vim-7.3.697/src/if_python3.c 2012-10-14 03:22:49.000000000 +0200
41 --- src/if_python3.c 2012-10-21 01:44:37.000000000 +0200
47 ! /* initialise threads, must be after Py_Initialize() */
50 #ifdef DYNAMIC_PYTHON3
56 ! /* Initialise threads, and save the state using PyGILState_Ensure.
57 ! * Without the call to PyGILState_Ensure, thread specific state (such
58 ! * as the system trace hook), will be lost between invocations of
61 + pygilstate = PyGILState_Ensure();
63 #ifdef DYNAMIC_PYTHON3
65 *** ../vim-7.3.697/src/version.c 2012-10-21 01:40:24.000000000 +0200
66 --- src/version.c 2012-10-21 01:42:44.000000000 +0200
70 { /* Add new patch number below this line */
76 ALL: A witch! A witch!
77 WITCH: It's a fair cop.
78 ALL: Burn her! Burn her! Let's make her into a ladder.
79 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
81 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
82 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
83 \\\ an exciting new programming language -- http://www.Zimbu.org ///
84 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///