From 441adb8c5782de6fcf71ee3396d114c48cd1cb5b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 13 Dec 2013 04:14:41 +0100 Subject: Backout changeset 46393019b650 test_capi is failing and the fix is not trivial, I prefer to revert --- Python/thread_pthread.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Python/thread_pthread.h') diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index d9f7c76f2ab..20f85358968 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -627,6 +627,9 @@ int PyThread_set_key_value(int key, void *value) { int fail; + void *oldValue = pthread_getspecific(key); + if (oldValue != NULL) + return 0; fail = pthread_setspecific(key, value); return fail ? -1 : 0; } -- cgit v1.2.3