diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:39:38 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:39:38 -0800 |
commit | 1a5780aabb550cae175ad8711e2f33ba644d0ddb (patch) | |
tree | 68e47eaafb4ccc17bbdb7668c6058984945b332d /Include/pythread.h | |
parent | 956c7cfa7111ab5458e2f69868a05b7b84fc6843 (diff) | |
parent | d1d8706cdb77e2adbbb4110338dcda0e1811f892 (diff) | |
download | cpython-1a5780aabb550cae175ad8711e2f33ba644d0ddb.tar.gz |
Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].
Diffstat (limited to 'Include/pythread.h')
-rw-r--r-- | Include/pythread.h | 13 |
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); |