summaryrefslogtreecommitdiff
path: root/c/misc_thread_posix.h
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2015-12-17 16:30:19 +0100
committerArmin Rigo <arigo@tunes.org>2015-12-17 16:30:19 +0100
commitc692dab2eca18cc95bb7d2b0152c425723489b51 (patch)
treeddc0326e3acb50c8a70a59077c3786d8f49f0298 /c/misc_thread_posix.h
parentb3b4731f785ca7b4bc1c33f73ea7793d528bef3b (diff)
downloadcffi-c692dab2eca18cc95bb7d2b0152c425723489b51.tar.gz
bump version number
Diffstat (limited to 'c/misc_thread_posix.h')
-rw-r--r--c/misc_thread_posix.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/c/misc_thread_posix.h b/c/misc_thread_posix.h
index 3f66834..f4df821 100644
--- a/c/misc_thread_posix.h
+++ b/c/misc_thread_posix.h
@@ -104,7 +104,8 @@ static void restore_errno(void)
to do that without these hacks. We can't use PyThreadState_GET(),
because that calls PyThreadState_Get() which fails an assert if the
result is NULL. */
-#ifndef _Py_atomic_load_relaxed /* this was abruptly un-defined in 3.5.1 */
+#if PY_MAJOR_VERSION >= 3 && !defined(_Py_atomic_load_relaxed)
+ /* this was abruptly un-defined in 3.5.1 */
void *volatile _PyThreadState_Current;
/* XXX simple volatile access is assumed atomic */
# define _Py_atomic_load_relaxed(pp) (*(pp))