diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-06 00:44:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-06 00:44:18 (GMT) |
commit | ed4aa83ff77ff11059f64dab711adf35ce9d0e0f (patch) | |
tree | cf430f6a641782d7c794c1adc73c055a3f120a69 /Include | |
parent | b3b0767861c69115a1482e3ade8d29207e204b15 (diff) | |
download | cpython-ed4aa83ff77ff11059f64dab711adf35ce9d0e0f.zip cpython-ed4aa83ff77ff11059f64dab711adf35ce9d0e0f.tar.gz cpython-ed4aa83ff77ff11059f64dab711adf35ce9d0e0f.tar.bz2 |
require a long long data type (closes #27961)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/longobject.h | 2 | ||||
-rw-r--r-- | Include/pyport.h | 25 | ||||
-rw-r--r-- | Include/pythread.h | 5 | ||||
-rw-r--r-- | Include/structmember.h | 2 |
4 files changed, 8 insertions, 26 deletions
diff --git a/Include/longobject.h b/Include/longobject.h index 60f8b22..6237001 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -85,14 +85,12 @@ PyAPI_FUNC(double) PyLong_AsDouble(PyObject *); PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *); PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *); -#ifdef HAVE_LONG_LONG PyAPI_FUNC(PyObject *) PyLong_FromLongLong(PY_LONG_LONG); PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG); PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLong(PyObject *); PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *); PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLongAndOverflow(PyObject *, int *); -#endif /* HAVE_LONG_LONG */ PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int); #ifndef Py_LIMITED_API diff --git a/Include/pyport.h b/Include/pyport.h index 4eca9b4..b9aa70b 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -35,10 +35,6 @@ HAVE_UINTPTR_T Meaning: The C9X type uintptr_t is supported by the compiler Used in: Py_uintptr_t -HAVE_LONG_LONG -Meaning: The compiler supports the C type "long long" -Used in: PY_LONG_LONG - **************************************************************************/ /* typedefs for some C9X-defined synonyms for integral types. @@ -53,7 +49,6 @@ Used in: PY_LONG_LONG * integral synonyms. Only define the ones we actually need. */ -#ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long #if defined(LLONG_MAX) @@ -78,7 +73,6 @@ Used in: PY_LONG_LONG #define PY_ULLONG_MAX (PY_LLONG_MAX * Py_ULL(2) + 1) #endif /* LLONG_MAX */ #endif -#endif /* HAVE_LONG_LONG */ /* a build with 30-bit digits for Python integers needs an exact-width * 32-bit unsigned integer type to store those digits. (We could just use @@ -161,7 +155,7 @@ typedef int Py_intptr_t; typedef unsigned long Py_uintptr_t; typedef long Py_intptr_t; -#elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P <= SIZEOF_LONG_LONG) +#elif SIZEOF_VOID_P <= SIZEOF_LONG_LONG typedef unsigned PY_LONG_LONG Py_uintptr_t; typedef PY_LONG_LONG Py_intptr_t; @@ -248,19 +242,16 @@ typedef int Py_ssize_clean_t; #endif /* PY_FORMAT_LONG_LONG is analogous to PY_FORMAT_SIZE_T above, but for - * the long long type instead of the size_t type. It's only available - * when HAVE_LONG_LONG is defined. The "high level" Python format + * the long long type instead of the size_t type. The "high level" Python format * functions listed above will interpret "lld" or "llu" correctly on * all platforms. */ -#ifdef HAVE_LONG_LONG -# ifndef PY_FORMAT_LONG_LONG -# ifdef MS_WINDOWS -# define PY_FORMAT_LONG_LONG "I64" -# else -# error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" -# endif -# endif +#ifndef PY_FORMAT_LONG_LONG +# ifdef MS_WINDOWS +# define PY_FORMAT_LONG_LONG "I64" +# else +# error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" +# endif #endif /* Py_LOCAL can be used instead of static to get the fastest possible calling diff --git a/Include/pythread.h b/Include/pythread.h index 6e9f303..6f3d08d 100644 --- a/Include/pythread.h +++ b/Include/pythread.h @@ -37,13 +37,8 @@ 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_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) diff --git a/Include/structmember.h b/Include/structmember.h index 948f690..5da8a46 100644 --- a/Include/structmember.h +++ b/Include/structmember.h @@ -49,10 +49,8 @@ typedef struct PyMemberDef { #define T_OBJECT_EX 16 /* Like T_OBJECT, but raises AttributeError when the value is NULL, instead of converting to None. */ -#ifdef HAVE_LONG_LONG #define T_LONGLONG 17 #define T_ULONGLONG 18 -#endif /* HAVE_LONG_LONG */ #define T_PYSSIZET 19 /* Py_ssize_t */ #define T_NONE 20 /* Value is always None */ |