summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-08-12 02:06:34 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-08-12 02:06:34 (GMT)
commit6b4953fd3d3d1df06f692af67f593d3d0a7aef26 (patch)
tree6b659e9036a0e6961855205920251a5b0bd6d647 /Python/ceval.c
parentb45f351832b00c80bf9881e92b12c330324e3116 (diff)
downloadcpython-6b4953fd3d3d1df06f692af67f593d3d0a7aef26.zip
cpython-6b4953fd3d3d1df06f692af67f593d3d0a7aef26.tar.gz
cpython-6b4953fd3d3d1df06f692af67f593d3d0a7aef26.tar.bz2
Check returned pointer is valid.
Klocwork #233
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index a0e8b30..6d2b17f 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -230,6 +230,15 @@ PyEval_InitThreads(void)
}
void
+_PyEval_FiniThreads(void)
+{
+ if (interpreter_lock)
+ PyThread_free_lock(interpreter_lock);
+ interpreter_lock = 0;
+ main_thread = 0;
+}
+
+void
PyEval_AcquireLock(void)
{
PyThread_acquire_lock(interpreter_lock, 1);