Author: Michael McGee <[email protected]>
Branch:
Changeset: r2656:aca84fd9f4e4
Date: 2016-04-05 15:57 -0700
http://bitbucket.org/cffi/cffi/changeset/aca84fd9f4e4/
Log: Change get_current_ts to always use _Py_atomic_load_relaxed when
available.
diff --git a/c/misc_thread_common.h b/c/misc_thread_common.h
--- a/c/misc_thread_common.h
+++ b/c/misc_thread_common.h
@@ -80,7 +80,7 @@
static PyThreadState *get_current_ts(void)
{
-#if PY_MAJOR_VERSION >= 3
+#if defined(_Py_atomic_load_relaxed)
return (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current);
#else
return _PyThreadState_Current;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit