We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2dde90 commit bb61072Copy full SHA for bb61072
Include/pyport.h
@@ -511,6 +511,17 @@ extern "C" {
511
#ifdef WITH_THREAD
512
// HAVE_THREAD_LOCAL is just defined here for compatibility's sake
513
# define HAVE_THREAD_LOCAL 1
514
+# ifdef thread_local
515
+# define _Py_thread_local thread_local
516
+# elif __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__)
517
+# define _Py_thread_local _Thread_local
518
+# elif defined(_MSC_VER) /* AKA NT_THREADS */
519
+# define _Py_thread_local __declspec(thread)
520
+# elif defined(__GNUC__) /* includes clang */
521
+# define _Py_thread_local __thread
522
+# else
523
+# error "no supported thread-local variable storage classifier"
524
+# endif
525
#endif
526
527
#if defined(__ANDROID__) || defined(__VXWORKS__)
0 commit comments