summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-05-26 15:43:38 (GMT)
committerGitHub <noreply@github.com>2020-05-26 15:43:38 (GMT)
commit578c3955e0222ec7b3146197467fbb0fcfae12fe (patch)
tree1314ca1eb6153feaf3fb1cae341784270ce24c32 /Include
parent8ad052464a4e0aef9a11663b80f187087b773592 (diff)
downloadcpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.zip
cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.gz
cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.bz2
bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
Only __index__ should be used to make integer conversions lossless.
Diffstat (limited to 'Include')
-rw-r--r--Include/longobject.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index 1b28809..dad08c2 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -173,23 +173,6 @@ PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
unsigned char* bytes, size_t n,
int little_endian, int is_signed);
-/* _PyLong_FromNbInt: Convert the given object to a PyLongObject
- using the nb_int slot, if available. Raise TypeError if either the
- nb_int slot is not available or the result of the call to nb_int
- returns something not of type int.
-*/
-PyAPI_FUNC(PyObject *) _PyLong_FromNbInt(PyObject *);
-
-/* Convert the given object to a PyLongObject using the nb_index or
- nb_int slots, if available (the latter is deprecated).
- Raise TypeError if either nb_index and nb_int slots are not
- available or the result of the call to nb_index or nb_int
- returns something not of type int.
- Should be replaced with PyNumber_Index after the end of the
- deprecation period.
-*/
-PyAPI_FUNC(PyObject *) _PyLong_FromNbIndexOrNbInt(PyObject *);
-
/* _PyLong_Format: Convert the long to a string object with given base,
appending a base prefix of 0[box] if base is 2, 8 or 16. */
PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *obj, int base);