diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2010-12-03 20:14:31 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2010-12-03 20:14:31 +0000 |
commit | bbbb00332d45ae20db0b9032efcb3bf397e2df3d (patch) | |
tree | 64339836deec8ec39dcf8735685892f9f0933d41 /Include/longobject.h | |
parent | 53971b6f36f0c0df64b44be4cbe03f7446c00bbb (diff) | |
download | cpython-bbbb00332d45ae20db0b9032efcb3bf397e2df3d.tar.gz |
Merge branches/pep-0384.
Diffstat (limited to 'Include/longobject.h')
-rw-r--r-- | Include/longobject.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/longobject.h b/Include/longobject.h index 6adf2620d2..c09565a117 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -50,7 +50,9 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); #endif /* SIZEOF_PID_T */ /* Used by Python/mystrtoul.c. */ +#ifndef Py_LIMITED_API PyAPI_DATA(unsigned char) _PyLong_DigitValue[256]; +#endif /* _PyLong_Frexp returns a double x and an exponent e such that the true value is approximately equal to x * 2**e. e is >= 0. x is @@ -58,7 +60,9 @@ PyAPI_DATA(unsigned char) _PyLong_DigitValue[256]; zeroes); otherwise, 0.5 <= abs(x) < 1.0. On overflow, which is possible if the number of bits doesn't fit into a Py_ssize_t, sets OverflowError and returns -1.0 for x, 0 for e. */ +#ifndef Py_LIMITED_API PyAPI_FUNC(double) _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e); +#endif PyAPI_FUNC(double) PyLong_AsDouble(PyObject *); PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *); @@ -74,8 +78,11 @@ PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLongAndOverflow(PyObject *, int *); #endif /* HAVE_LONG_LONG */ PyAPI_FUNC(PyObject *) PyLong_FromString(char *, char **, int); +#ifndef Py_LIMITED_API PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); +#endif +#ifndef Py_LIMITED_API /* _PyLong_Sign. Return 0 if v is 0, -1 if v < 0, +1 if v > 0. v must not be NULL, and must be a normalized long. There are no error cases. @@ -150,6 +157,7 @@ PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base); PyAPI_FUNC(PyObject *) _PyLong_FormatAdvanced(PyObject *obj, Py_UNICODE *format_spec, Py_ssize_t format_spec_len); +#endif /* Py_LIMITED_API */ /* These aren't really part of the long object, but they're handy. The functions are in Python/mystrtoul.c. |