Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43162b8

Browse files
committed
take linkage def outside of WITH_THREAD conditional (closes #14569)
1 parent 504a83f commit 43162b8

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Python/pystate.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ the expense of doing their own locking).
2222
#endif
2323
#endif
2424

25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
2528

2629
#ifdef WITH_THREAD
2730
#include "pythread.h"
@@ -30,10 +33,6 @@ static PyThread_type_lock head_mutex = NULL; /* Protects interp->tstate_head */
3033
#define HEAD_LOCK() PyThread_acquire_lock(head_mutex, WAIT_LOCK)
3134
#define HEAD_UNLOCK() PyThread_release_lock(head_mutex)
3235

33-
#ifdef __cplusplus
34-
extern "C" {
35-
#endif
36-
3736
/* The single PyInterpreterState used by this process'
3837
GILState implementation
3938
*/

0 commit comments

Comments
 (0)