diff options
author | Guido van Rossum <guido@python.org> | 1998-12-21 19:32:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-21 19:32:43 (GMT) |
commit | 65d5b5763c6bbd99d2e2c6b219570f4562382ff0 (patch) | |
tree | 0a909da387c751fbfe8a90bb4a5a83f59f6c86a5 /Modules/_tkinter.c | |
parent | 14f53a77579d411b7b3f491f45753315e40f1aa9 (diff) | |
download | cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.zip cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.tar.gz cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.tar.bz2 |
Thanks to Chris Herborth, the thread primitives now have proper Py*
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py names).
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r-- | Modules/_tkinter.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 9d68c69..46bf8da 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -171,29 +171,29 @@ PERFORMANCE OF THIS SOFTWARE. */ -static type_lock tcl_lock = 0; +static PyThread_type_lock tcl_lock = 0; static PyThreadState *tcl_tstate = NULL; #define ENTER_TCL \ { PyThreadState *tstate = PyThreadState_Get(); Py_BEGIN_ALLOW_THREADS \ - acquire_lock(tcl_lock, 1); tcl_tstate = tstate; + PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; #define LEAVE_TCL \ - tcl_tstate = NULL; release_lock(tcl_lock); Py_END_ALLOW_THREADS} + tcl_tstate = NULL; PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS} #define ENTER_OVERLAP \ Py_END_ALLOW_THREADS #define LEAVE_OVERLAP_TCL \ - tcl_tstate = NULL; release_lock(tcl_lock); } + tcl_tstate = NULL; PyThread_release_lock(tcl_lock); } #define ENTER_PYTHON \ { PyThreadState *tstate = tcl_tstate; tcl_tstate = NULL; \ - release_lock(tcl_lock); PyEval_RestoreThread((tstate)); } + PyThread_release_lock(tcl_lock); PyEval_RestoreThread((tstate)); } #define LEAVE_PYTHON \ { PyThreadState *tstate = PyEval_SaveThread(); \ - acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } + PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } #else @@ -1679,11 +1679,11 @@ Tkapp_MainLoop(self, args) #ifdef WITH_THREAD Py_BEGIN_ALLOW_THREADS - acquire_lock(tcl_lock, 1); + PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; result = Tcl_DoOneEvent(TCL_DONT_WAIT); tcl_tstate = NULL; - release_lock(tcl_lock); + PyThread_release_lock(tcl_lock); if (result == 0) Sleep(20); Py_END_ALLOW_THREADS @@ -1921,13 +1921,13 @@ EventHook() #endif #if defined(WITH_THREAD) || defined(MS_WINDOWS) Py_BEGIN_ALLOW_THREADS - acquire_lock(tcl_lock, 1); + PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = event_tstate; result = Tcl_DoOneEvent(TCL_DONT_WAIT); tcl_tstate = NULL; - release_lock(tcl_lock); + PyThread_release_lock(tcl_lock); if (result == 0) Sleep(20); Py_END_ALLOW_THREADS @@ -2014,7 +2014,7 @@ init_tkinter() Tkapp_Type.ob_type = &PyType_Type; #ifdef WITH_THREAD - tcl_lock = allocate_lock(); + tcl_lock = PyThread_allocate_lock(); #endif m = Py_InitModule("_tkinter", moduleMethods); |