From 6688eb536ab7b88ade020b0e4e51e2ea74db82d1 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 13 Apr 2012 11:58:27 -0400 Subject: [PATCH] take linkage def outside of WITH_THREAD conditional (closes #14569) --- Python/pystate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Python/pystate.c b/Python/pystate.c index ddb7d425898..70ade98285d 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 */