8000 gh-103323: Get the "Current" Thread State from a Thread-Local Variable by ericsnowcurrently · Pull Request #103324 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-103323: Get the "Current" Thread State from a Thread-Local Variable #103324

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Prev Previous commit
Next Next commit
Fix the error message.
  • Loading branch information
ericsnowcurrently committed Apr 7, 2023
commit feb8ef525120044eb974dbcdaf631e65db1287be
2 changes: 1 addition & 1 deletion Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ extern char * _getpty(int *, int, mode_t, int);
#ifdef WITH_THREAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is useless. This macro is now always defined. It's only kept for backward compatibility.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it affect WASM builds?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the code 3 lines above:

#ifndef WITH_THREAD
#  define WITH_THREAD
#endif

# ifdef Py_BUILD_CORE
# ifdef HAVE_THREAD_LOCAL
# error "unexpectedly, HAVE_THREAD_LOCAL is already defined"
# error "HAVE_THREAD_LOCAL is already defined"
# endif
# define HAVE_THREAD_LOCAL 1
# ifdef thread_local
Expand Down
0