summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/longobject.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index 82c06c9..b696f54 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -177,7 +177,17 @@ PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
nb_int slot is not available or the result of the call to nb_int
returns something not of type int.
*/
-PyAPI_FUNC(PyLongObject *)_PyLong_FromNbInt(PyObject *);
+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. */