diff options
author | Ned Deily <nad@acm.org> | 2015-05-08 14:46:53 -0700 |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2015-05-08 14:46:53 -0700 |
commit | 29bdbf00501356e8d7dfcb66fd38a6d8efbc4358 (patch) | |
tree | 918e367ea347214befe66c7903db07161f84215f /Include/pystate.h | |
parent | cbaba4154a942f2c591054069d9c1f2275787e42 (diff) | |
parent | ac872f94c45ff23b613f4afbdff32ca3cc8fc1ce (diff) | |
download | cpython-29bdbf00501356e8d7dfcb66fd38a6d8efbc4358.tar.gz |
Minor updates to the OS X installer ReadMe.rtf.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r-- | Include/pystate.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Include/pystate.h b/Include/pystate.h index 4992c22684..8539b65013 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -174,12 +174,16 @@ PyAPI_FUNC(int) PyThreadState_SetAsyncExc(long, PyObject *); /* Variable and macro for in-line access to current thread state */ /* Assuming the current thread holds the GIL, this is the - PyThreadState for the current thread. */ -#ifndef Py_LIMITED_API + PyThreadState for the current thread. + + Issue #23644: pyatomic.h is incompatible with C++ (yet). Disable + PyThreadState_GET() optimization: declare it as an alias to + PyThreadState_Get(), as done for limited API. */ +#if !defined(Py_LIMITED_API) && !defined(__cplusplus) PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current; #endif -#if defined(Py_DEBUG) || defined(Py_LIMITED_API) +#if defined(Py_DEBUG) || defined(Py_LIMITED_API) || defined(__cplusplus) #define PyThreadState_GET() PyThreadState_Get() #else #define PyThreadState_GET() \ |