bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask() (GH-13860)
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 6be29f9..fdaefaf 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -288,7 +288,8 @@
If the value of *obj* is out of range for an :c:type:`unsigned long`,
return the reduction of that value modulo ``ULONG_MAX + 1``.
- Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate.
+ Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to
+ disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.
@@ -307,7 +308,8 @@
If the value of *obj* is out of range for an :c:type:`unsigned long long`,
return the reduction of that value modulo ``PY_ULLONG_MAX + 1``.
- Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate.
+ Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred`
+ to disambiguate.
.. versionchanged:: 3.8
Use :meth:`__index__` if available.