summaryrefslogtreecommitdiffstats
path: root/Include/longobject.h
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-25 12:18:43 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-25 12:18:43 (GMT)
commit7f39c9fcbba0cc59293d80a7bbcbb8bca62790ee (patch)
tree45d87f47f89cb721ce974534de75b3d42079d793 /Include/longobject.h
parent5f95a79b2bf395d114cac2bb74edb6c327ea0a34 (diff)
downloadcpython-7f39c9fcbba0cc59293d80a7bbcbb8bca62790ee.zip
cpython-7f39c9fcbba0cc59293d80a7bbcbb8bca62790ee.tar.gz
cpython-7f39c9fcbba0cc59293d80a7bbcbb8bca62790ee.tar.bz2
Backport of several functions from Python 3.0 to 2.6 including PyUnicode_FromString, PyUnicode_Format and PyLong_From/AsSsize_t. The functions are partly required for the backport of the bytearray type and _fileio module. They should also make it easier to port C to 3.0.
First chapter of the Python 3.0 io framework back port: _fileio The next step depends on a working bytearray type which itself depends on a backport of the nwe buffer API.
Diffstat (limited to 'Include/longobject.h')
-rw-r--r--Include/longobject.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index 13f2e41..379e934 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -18,14 +18,17 @@ PyAPI_DATA(PyTypeObject) PyLong_Type;
PyAPI_FUNC(PyObject *) PyLong_FromLong(long);
PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long);
PyAPI_FUNC(PyObject *) PyLong_FromDouble(double);
+PyAPI_FUNC(PyObject *) PyLong_FromSize_t(size_t);
+PyAPI_FUNC(PyObject *) PyLong_FromSsize_t(Py_ssize_t);
PyAPI_FUNC(long) PyLong_AsLong(PyObject *);
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
+PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(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);
+#define _PyLong_AsSsize_t PyLong_AsSsize_t
+#define _PyLong_FromSize_t PyLong_FromSize_t
+#define _PyLong_FromSsize_t PyLong_FromSsize_t
PyAPI_DATA(int) _PyLong_DigitValue[256];
/* _PyLong_AsScaledDouble returns a double x and an exponent e such that