summaryrefslogtreecommitdiff
path: root/Include/pythread.h
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:08:17 +0100
committerNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:08:17 +0100
commitc6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (patch)
treefb4a5c18886537b4b7df46ed3b2aa579747ff507 /Include/pythread.h
parent5e0114a832a903518c4af6983161c0c2a8942a24 (diff)
parent819a21a3a4aac38f32e1ba4f68bcef45591fa3f0 (diff)
downloadcpython-c6180bb73c8c7c7f9d8ea9816487b710597b6fc1.tar.gz
Merge issue #26355 fix from Python 3.5
Diffstat (limited to 'Include/pythread.h')
-rw-r--r--Include/pythread.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/Include/pythread.h b/Include/pythread.h
index 6e9f30337f..88c4873a55 100644
--- a/Include/pythread.h
+++ b/Include/pythread.h
@@ -37,19 +37,14 @@ PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int);
module exposes a higher-level API, with timeouts expressed in seconds
and floating-point numbers allowed.
*/
-#if defined(HAVE_LONG_LONG)
-#define PY_TIMEOUT_T PY_LONG_LONG
+#define PY_TIMEOUT_T long long
#define PY_TIMEOUT_MAX PY_LLONG_MAX
-#else
-#define PY_TIMEOUT_T long
-#define PY_TIMEOUT_MAX LONG_MAX
-#endif
/* In the NT API, the timeout is a DWORD and is expressed in milliseconds */
#if defined (NT_THREADS)
-#if (Py_LL(0xFFFFFFFF) * 1000 < PY_TIMEOUT_MAX)
+#if 0xFFFFFFFFLL * 1000 < PY_TIMEOUT_MAX
#undef PY_TIMEOUT_MAX
-#define PY_TIMEOUT_MAX (Py_LL(0xFFFFFFFF) * 1000)
+#define PY_TIMEOUT_MAX (0xFFFFFFFFLL * 1000)
#endif
#endif
@@ -74,7 +69,9 @@ PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock);
PyAPI_FUNC(size_t) PyThread_get_stacksize(void);
PyAPI_FUNC(int) PyThread_set_stacksize(size_t);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
PyAPI_FUNC(PyObject*) PyThread_GetInfo(void);
+#endif
/* Thread Local Storage (TLS) API */
PyAPI_FUNC(int) PyThread_create_key(void);