summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-13 11:58:27 -0400
committerBenjamin Peterson <benjamin@python.org>2012-04-13 11:58:27 -0400
commit02400ac5edf2bf490fede02c696408b0a91e4b64 (patch)
treee4b77accfa2379ba9db82ba364ad75b6950d18dc /Python
parent4ca285db9687f70c86264cc146b9125a0558dd19 (diff)
downloadcpython-02400ac5edf2bf490fede02c696408b0a91e4b64.tar.gz
take linkage def outside of WITH_THREAD conditional (closes #14569)
Diffstat (limited to 'Python')
-rw-r--r--Python/pystate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 3b4c6a2e65..9fc4c1262d 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -22,6 +22,9 @@ the expense of doing their own locking).
#endif
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifdef WITH_THREAD
#include "pythread.h"
@@ -30,10 +33,6 @@ static PyThread_type_lock head_mutex = NULL; /* Protects interp->tstate_head */
#define HEAD_LOCK() PyThread_acquire_lock(head_mutex, WAIT_LOCK)
#define HEAD_UNLOCK() PyThread_release_lock(head_mutex)
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* The single PyInterpreterState used by this process'
GILState implementation
*/