mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged the int/long unification branch, by very crude means (sorry Thomas!).
I banged on the code (beyond what's in that branch) to make fewer tests fail; the only tests that fail now are: test_descr -- can't pickle ints?! test_pickletools -- ??? test_socket -- See python.org/sf/1619659 test_sqlite -- ??? I'll deal with those later.
This commit is contained in:
parent
5b787e8bc2
commit
ddefaf31b3
46 changed files with 798 additions and 404 deletions
|
@ -16,15 +16,16 @@ PyAPI_DATA(PyTypeObject) PyLong_Type;
|
|||
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromLong(long);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromSize_t(size_t);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromSsize_t(Py_ssize_t);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromDouble(double);
|
||||
PyAPI_FUNC(long) PyLong_AsLong(PyObject *);
|
||||
PyAPI_FUNC(ssize_t) PyLong_AsSsize_t(PyObject *);
|
||||
PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *);
|
||||
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
|
||||
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
|
||||
|
||||
/* For use by intobject.c only */
|
||||
PyAPI_FUNC(Py_ssize_t) _PyLong_AsSsize_t(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) _PyLong_FromSize_t(size_t);
|
||||
PyAPI_FUNC(PyObject *) _PyLong_FromSsize_t(Py_ssize_t);
|
||||
PyAPI_DATA(int) _PyLong_DigitValue[256];
|
||||
|
||||
/* _PyLong_AsScaledDouble returns a double x and an exponent e such that
|
||||
|
@ -34,6 +35,7 @@ PyAPI_DATA(int) _PyLong_DigitValue[256];
|
|||
be multiplied by SHIFT! There may not be enough room in an int to store
|
||||
e*SHIFT directly. */
|
||||
PyAPI_FUNC(double) _PyLong_AsScaledDouble(PyObject *vv, int *e);
|
||||
PyAPI_FUNC(int) _PyLong_FitsInLong(PyObject* vv);
|
||||
|
||||
PyAPI_FUNC(double) PyLong_AsDouble(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue