summaryrefslogtreecommitdiff
path: root/Include/longobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-14 03:31:43 +0000
committerGuido van Rossum <guido@python.org>2007-01-14 03:31:43 +0000
commitb0fee2cad44bf56ad9483ed0f42c29af83cb9485 (patch)
tree1ab48f8213d1de96d7297b9b5bf49c6d1944b31e /Include/longobject.h
parentf5cbf060c80ed8ccb219ce77a819bf57ae8a073f (diff)
downloadcpython-b0fee2cad44bf56ad9483ed0f42c29af83cb9485.tar.gz
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.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index eef4e9b4bc..7f2cda6f9c 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 *);