mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-108444: Add PyLong_AsInt() public function (#108445)
* Rename _PyLong_AsInt() to PyLong_AsInt(). * Add documentation. * Add test. * For now, keep _PyLong_AsInt() as an alias to PyLong_AsInt().
This commit is contained in:
parent
feb9a49c9c
commit
be436e08b8
13 changed files with 96 additions and 3 deletions
|
|
@ -549,7 +549,7 @@ PyLong_AsLong(PyObject *obj)
|
|||
method. Return -1 and set an error if overflow occurs. */
|
||||
|
||||
int
|
||||
_PyLong_AsInt(PyObject *obj)
|
||||
PyLong_AsInt(PyObject *obj)
|
||||
{
|
||||
int overflow;
|
||||
long result = PyLong_AsLongAndOverflow(obj, &overflow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue