mirror of
https://github.com/python/cpython
synced 2026-09-28 09:38:18 +03:00
replace PY_LONG_LONG with long long
This commit is contained in:
parent
45c7514de4
commit
af580dff4a
29 changed files with 222 additions and 234 deletions
|
|
@ -85,12 +85,12 @@ PyAPI_FUNC(double) PyLong_AsDouble(PyObject *);
|
|||
PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *);
|
||||
PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *);
|
||||
|
||||
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 *);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromLongLong(long long);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned long long);
|
||||
PyAPI_FUNC(long long) PyLong_AsLongLong(PyObject *);
|
||||
PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLong(PyObject *);
|
||||
PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLongMask(PyObject *);
|
||||
PyAPI_FUNC(long long) PyLong_AsLongLongAndOverflow(PyObject *, int *);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int);
|
||||
#ifndef Py_LIMITED_API
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ typedef unsigned long Py_uintptr_t;
|
|||
typedef long Py_intptr_t;
|
||||
|
||||
#elif SIZEOF_VOID_P <= SIZEOF_LONG_LONG
|
||||
typedef unsigned PY_LONG_LONG Py_uintptr_t;
|
||||
typedef PY_LONG_LONG Py_intptr_t;
|
||||
typedef unsigned long long Py_uintptr_t;
|
||||
typedef long long Py_intptr_t;
|
||||
|
||||
#else
|
||||
# error "Python needs a typedef for Py_uintptr_t in pyport.h."
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ 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.
|
||||
*/
|
||||
#define PY_TIMEOUT_T PY_LONG_LONG
|
||||
#define PY_TIMEOUT_T long long
|
||||
#define PY_TIMEOUT_MAX PY_LLONG_MAX
|
||||
|
||||
/* In the NT API, the timeout is a DWORD and is expressed in milliseconds */
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ PyAPI_FUNC(_PyTime_t) _PyTime_FromSeconds(int seconds);
|
|||
((_PyTime_t)(seconds) * (1000 * 1000 * 1000))
|
||||
|
||||
/* Create a timestamp from a number of nanoseconds. */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(PY_LONG_LONG ns);
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(long long ns);
|
||||
|
||||
/* Convert a number of seconds (Python float or int) to a timetamp.
|
||||
Raise an exception and return -1 on error, return 0 on success. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue