mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)
Argument Clinic now uses the new public PyLong_AsInt(), rather than the old name _PyLong_AsInt().
This commit is contained in:
parent
be800f4be7
commit
4e5a7284ee
73 changed files with 467 additions and 466 deletions
24
Python/clinic/instrumentation.c.h
generated
24
Python/clinic/instrumentation.c.h
generated
|
@ -29,7 +29,7 @@ monitoring_use_tool_id(PyObject *module, PyObject *const *args, Py_ssize_t nargs
|
|||
if (!_PyArg_CheckPositional("use_tool_id", nargs, 2, 2)) {
|
||||
goto exit;
|
||||
}
|
||||
tool_id = _PyLong_AsInt(args[0]);
|
||||
tool_id = PyLong_AsInt(args[0]);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ monitoring_free_tool_id(PyObject *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int tool_id;
|
||||
|
||||
tool_id = _PyLong_AsInt(arg);
|
||||
tool_id = PyLong_AsInt(arg);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ monitoring_get_tool(PyObject *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int tool_id;
|
||||
|
||||
tool_id = _PyLong_AsInt(arg);
|
||||
tool_id = PyLong_AsInt(arg);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -117,11 +117,11 @@ monitoring_register_callback(PyObject *module, PyObject *const *args, Py_ssize_t
|
|||
if (!_PyArg_CheckPositional("register_callback", nargs, 3, 3)) {
|
||||
goto exit;
|
||||
}
|
||||
tool_id = _PyLong_AsInt(args[0]);
|
||||
tool_id = PyLong_AsInt(args[0]);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
event = _PyLong_AsInt(args[1]);
|
||||
event = PyLong_AsInt(args[1]);
|
||||
if (event == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ monitoring_get_events(PyObject *module, PyObject *arg)
|
|||
int tool_id;
|
||||
int _return_value;
|
||||
|
||||
tool_id = _PyLong_AsInt(arg);
|
||||
tool_id = PyLong_AsInt(arg);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -185,11 +185,11 @@ monitoring_set_events(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
|||
if (!_PyArg_CheckPositional("set_events", nargs, 2, 2)) {
|
||||
goto exit;
|
||||
}
|
||||
tool_id = _PyLong_AsInt(args[0]);
|
||||
tool_id = PyLong_AsInt(args[0]);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
event_set = _PyLong_AsInt(args[1]);
|
||||
event_set = PyLong_AsInt(args[1]);
|
||||
if (event_set == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ monitoring_get_local_events(PyObject *module, PyObject *const *args, Py_ssize_t
|
|||
if (!_PyArg_CheckPositional("get_local_events", nargs, 2, 2)) {
|
||||
goto exit;
|
||||
}
|
||||
tool_id = _PyLong_AsInt(args[0]);
|
||||
tool_id = PyLong_AsInt(args[0]);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -260,12 +260,12 @@ monitoring_set_local_events(PyObject *module, PyObject *const *args, Py_ssize_t
|
|||
if (!_PyArg_CheckPositional("set_local_events", nargs, 3, 3)) {
|
||||
goto exit;
|
||||
}
|
||||
tool_id = _PyLong_AsInt(args[0]);
|
||||
tool_id = PyLong_AsInt(args[0]);
|
||||
if (tool_id == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
code = args[1];
|
||||
event_set = _PyLong_AsInt(args[2]);
|
||||
event_set = PyLong_AsInt(args[2]);
|
||||
if (event_set == -1 && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -308,4 +308,4 @@ monitoring__all_events(PyObject *module, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return monitoring__all_events_impl(module);
|
||||
}
|
||||
/*[clinic end generated code: output=11cc0803875b3ffa input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=8baabc8341df3f0e input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue