diff options
author | Victor Stinner <vstinner@python.org> | 2023-08-24 22:51:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 22:51:22 (GMT) |
commit | 4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8 (patch) | |
tree | 31cacab08c7168e0868d6231a70b4a679fffdf58 /PC | |
parent | be800f4be78106d7566c694b3a5652761798db96 (diff) | |
download | cpython-4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8.zip cpython-4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8.tar.gz cpython-4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8.tar.bz2 |
gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)
Argument Clinic now uses the new public PyLong_AsInt(), rather than
the old name _PyLong_AsInt().
Diffstat (limited to 'PC')
-rw-r--r-- | PC/clinic/msvcrtmodule.c.h | 22 | ||||
-rw-r--r-- | PC/clinic/winreg.c.h | 22 | ||||
-rw-r--r-- | PC/clinic/winsound.c.h | 10 |
3 files changed, 27 insertions, 27 deletions
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h index 94e1730..af6710a 100644 --- a/PC/clinic/msvcrtmodule.c.h +++ b/PC/clinic/msvcrtmodule.c.h @@ -59,11 +59,11 @@ msvcrt_locking(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("locking", nargs, 3, 3)) { goto exit; } - fd = _PyLong_AsInt(args[0]); + fd = PyLong_AsInt(args[0]); if (fd == -1 && PyErr_Occurred()) { goto exit; } - mode = _PyLong_AsInt(args[1]); + mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; } @@ -105,11 +105,11 @@ msvcrt_setmode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!_PyArg_CheckPositional("setmode", nargs, 2, 2)) { goto exit; } - fd = _PyLong_AsInt(args[0]); + fd = PyLong_AsInt(args[0]); if (fd == -1 && PyErr_Occurred()) { goto exit; } - flags = _PyLong_AsInt(args[1]); + flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; } @@ -154,7 +154,7 @@ msvcrt_open_osfhandle(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!handle && PyErr_Occurred()) { goto exit; } - flags = _PyLong_AsInt(args[1]); + flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; } @@ -189,7 +189,7 @@ msvcrt_get_osfhandle(PyObject *module, PyObject *arg) int fd; void *_return_value; - fd = _PyLong_AsInt(arg); + fd = PyLong_AsInt(arg); if (fd == -1 && PyErr_Occurred()) { goto exit; } @@ -514,7 +514,7 @@ msvcrt_CrtSetReportFile(PyObject *module, PyObject *const *args, Py_ssize_t narg if (!_PyArg_CheckPositional("CrtSetReportFile", nargs, 2, 2)) { goto exit; } - type = _PyLong_AsInt(args[0]); + type = PyLong_AsInt(args[0]); if (type == -1 && PyErr_Occurred()) { goto exit; } @@ -561,11 +561,11 @@ msvcrt_CrtSetReportMode(PyObject *module, PyObject *const *args, Py_ssize_t narg if (!_PyArg_CheckPositional("CrtSetReportMode", nargs, 2, 2)) { goto exit; } - type = _PyLong_AsInt(args[0]); + type = PyLong_AsInt(args[0]); if (type == -1 && PyErr_Occurred()) { goto exit; } - mode = _PyLong_AsInt(args[1]); + mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; } @@ -604,7 +604,7 @@ msvcrt_set_error_mode(PyObject *module, PyObject *arg) int mode; long _return_value; - mode = _PyLong_AsInt(arg); + mode = PyLong_AsInt(arg); if (mode == -1 && PyErr_Occurred()) { goto exit; } @@ -701,4 +701,4 @@ exit: #ifndef MSVCRT_GETERRORMODE_METHODDEF #define MSVCRT_GETERRORMODE_METHODDEF #endif /* !defined(MSVCRT_GETERRORMODE_METHODDEF) */ -/*[clinic end generated code: output=9dd12bf210e362a4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f70de1b6d0e700cd input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 2aa0698..a7401b9 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -401,7 +401,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto skip_optional_pos; } if (args[2]) { - reserved = _PyLong_AsInt(args[2]); + reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; } @@ -409,7 +409,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto skip_optional_pos; } } - access = _PyLong_AsInt(args[3]); + access = PyLong_AsInt(args[3]); if (access == -1 && PyErr_Occurred()) { goto exit; } @@ -579,7 +579,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto skip_optional_pos; } if (args[2]) { - access = _PyLong_AsInt(args[2]); + access = PyLong_AsInt(args[2]); if (access == -1 && PyErr_Occurred()) { goto exit; } @@ -587,7 +587,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto skip_optional_pos; } } - reserved = _PyLong_AsInt(args[3]); + reserved = PyLong_AsInt(args[3]); if (reserved == -1 && PyErr_Occurred()) { goto exit; } @@ -695,7 +695,7 @@ winreg_EnumKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { goto exit; } - index = _PyLong_AsInt(args[1]); + index = PyLong_AsInt(args[1]); if (index == -1 && PyErr_Occurred()) { goto exit; } @@ -752,7 +752,7 @@ winreg_EnumValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { goto exit; } - index = _PyLong_AsInt(args[1]); + index = PyLong_AsInt(args[1]); if (index == -1 && PyErr_Occurred()) { goto exit; } @@ -1016,7 +1016,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_pos; } if (args[2]) { - reserved = _PyLong_AsInt(args[2]); + reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; } @@ -1024,7 +1024,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_pos; } } - access = _PyLong_AsInt(args[3]); + access = PyLong_AsInt(args[3]); if (access == -1 && PyErr_Occurred()) { goto exit; } @@ -1133,7 +1133,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } if (args[2]) { - reserved = _PyLong_AsInt(args[2]); + reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; } @@ -1141,7 +1141,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - access = _PyLong_AsInt(args[3]); + access = PyLong_AsInt(args[3]); if (access == -1 && PyErr_Occurred()) { goto exit; } @@ -1788,4 +1788,4 @@ exit: #ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF #define WINREG_QUERYREFLECTIONKEY_METHODDEF #endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */ -/*[clinic end generated code: output=d2bf1f58ad07e5f8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4d0ec3e43e1b28f4 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h index 241d547..d352612 100644 --- a/PC/clinic/winsound.c.h +++ b/PC/clinic/winsound.c.h @@ -63,7 +63,7 @@ winsound_PlaySound(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto exit; } sound = args[0]; - flags = _PyLong_AsInt(args[1]); + flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; } @@ -128,11 +128,11 @@ winsound_Beep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!args) { goto exit; } - frequency = _PyLong_AsInt(args[0]); + frequency = PyLong_AsInt(args[0]); if (frequency == -1 && PyErr_Occurred()) { goto exit; } - duration = _PyLong_AsInt(args[1]); + duration = PyLong_AsInt(args[1]); if (duration == -1 && PyErr_Occurred()) { goto exit; } @@ -196,7 +196,7 @@ winsound_MessageBeep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - type = _PyLong_AsInt(args[0]); + type = PyLong_AsInt(args[0]); if (type == -1 && PyErr_Occurred()) { goto exit; } @@ -206,4 +206,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=f70b7730127208d8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e63a6516d7a55cb8 input=a9049054013a1b77]*/ |