diff options
author | Guido van Rossum <guido@python.org> | 2007-01-14 03:31:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-01-14 03:31:43 (GMT) |
commit | ddefaf31b366ea84250fc5090837c2b764a04102 (patch) | |
tree | ab3d7b5172f4e6a064165468fc70beb41bdca1d3 /Include/longobject.h | |
parent | 5b787e8bc2dbda5583eee039cb6a6e47c8d8a034 (diff) | |
download | cpython-ddefaf31b366ea84250fc5090837c2b764a04102.zip cpython-ddefaf31b366ea84250fc5090837c2b764a04102.tar.gz cpython-ddefaf31b366ea84250fc5090837c2b764a04102.tar.bz2 |
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.
Diffstat (limited to 'Include/longobject.h')
-rw-r--r-- | Include/longobject.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Include/longobject.h b/Include/longobject.h index eef4e9b..7f2cda6 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -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 *); |