mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
gh-108444: Replace _PyLong_AsInt() with PyLong_AsInt() (#108459)
Change generated by the command: sed -i -e 's!_PyLong_AsInt!PyLong_AsInt!g' \ $(find -name "*.c" -o -name "*.h")
This commit is contained in:
parent
4e5a7284ee
commit
b32d4cad15
18 changed files with 32 additions and 32 deletions
|
@ -4879,17 +4879,17 @@ sock_sendmsg_afalg(PySocketSockObject *self, PyObject *args, PyObject *kwds)
|
|||
|
||||
/* op is a required, keyword-only argument >= 0 */
|
||||
if (opobj != NULL) {
|
||||
op = _PyLong_AsInt(opobj);
|
||||
op = PyLong_AsInt(opobj);
|
||||
}
|
||||
if (op < 0) {
|
||||
/* override exception from _PyLong_AsInt() */
|
||||
/* override exception from PyLong_AsInt() */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"Invalid or missing argument 'op'");
|
||||
goto finally;
|
||||
}
|
||||
/* assoclen is optional but must be >= 0 */
|
||||
if (assoclenobj != NULL) {
|
||||
assoclen = _PyLong_AsInt(assoclenobj);
|
||||
assoclen = PyLong_AsInt(assoclenobj);
|
||||
if (assoclen == -1 && PyErr_Occurred()) {
|
||||
goto finally;
|
||||
}
|
||||
|
@ -5007,7 +5007,7 @@ sock_shutdown(PySocketSockObject *s, PyObject *arg)
|
|||
int how;
|
||||
int res;
|
||||
|
||||
how = _PyLong_AsInt(arg);
|
||||
how = PyLong_AsInt(arg);
|
||||
if (how == -1 && PyErr_Occurred())
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue