Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-142163: Only defineHAVE_THREAD_LOCAL whenPy_BUILD_CORE is set#142164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletionsInclude/pyport.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -509,9 +509,15 @@ extern "C" {
# define Py_CAN_START_THREADS 1
#endif

#ifdef WITH_THREAD
// HAVE_THREAD_LOCAL is just defined here for compatibility's sake

/* gh-142163: Some libraries rely on HAVE_THREAD_LOCAL being undefined, so
* we can only define it only when Py_BUILD_CORE is set.*/
#ifdef Py_BUILD_CORE
// This is no longer coupled to _Py_thread_local.
# define HAVE_THREAD_LOCAL 1
#endif

#ifdef WITH_THREAD
# ifdef thread_local
# define _Py_thread_local thread_local
# elif __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
Fix the ``HAVE_THREAD_LOCAL`` macro being defined without the
``Py_BUILD_CORE`` macro set after including :file:`Python.h`.
Loading

[8]ページ先頭

©2009-2026 Movatter.jp