diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2010-12-03 20:14:31 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2010-12-03 20:14:31 (GMT) |
commit | 4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 (patch) | |
tree | c8f1fef715f8d158e58f17cab14af65455de1d77 /Include/longobject.h | |
parent | c4df7845143f9afe0d20f4421a41904f3cbb991a (diff) | |
download | cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.zip cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.gz cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.bz2 |
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 6adf262..c09565a 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. |