mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.12] gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386) (#130549)
(cherry picked from commit 425587a110)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
3983fcad95
commit
4c1d52934d
1 changed files with 10 additions and 0 deletions
|
|
@ -135,6 +135,16 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
|
|||
.. versionchanged:: 3.10
|
||||
This function will no longer use :meth:`~object.__int__`.
|
||||
|
||||
.. c:namespace:: NULL
|
||||
|
||||
.. c:function:: long PyLong_AS_LONG(PyObject *obj)
|
||||
|
||||
A :term:`soft deprecated` alias.
|
||||
Exactly equivalent to the preferred ``PyLong_AsLong``. In particular,
|
||||
it can fail with :exc:`OverflowError` or another exception.
|
||||
|
||||
.. deprecated:: 3.14
|
||||
The function is soft deprecated.
|
||||
|
||||
.. c:function:: long PyLong_AsLongAndOverflow(PyObject *obj, int *overflow)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue