summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_winapi.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-10-20 15:08:41 (GMT)
committerGitHub <noreply@github.com>2023-10-20 15:08:41 (GMT)
commit59ea0f523e155ac1a471cd292b41a76241fccd36 (patch)
tree9d5f216adbc400011f3e7e35c17575a379c735ac /Modules/clinic/_winapi.c.h
parentff4e53cb747063e95eaec181fd396f062f885ac2 (diff)
downloadcpython-59ea0f523e155ac1a471cd292b41a76241fccd36.zip
cpython-59ea0f523e155ac1a471cd292b41a76241fccd36.tar.gz
cpython-59ea0f523e155ac1a471cd292b41a76241fccd36.tar.bz2
gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)
Diffstat (limited to 'Modules/clinic/_winapi.c.h')
-rw-r--r--Modules/clinic/_winapi.c.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h
index ae8cc1d..3a3231c 100644
--- a/Modules/clinic/_winapi.c.h
+++ b/Modules/clinic/_winapi.c.h
@@ -568,7 +568,7 @@ _winapi_GetExitCodeProcess(PyObject *module, PyObject *arg)
if ((_return_value == PY_DWORD_MAX) && PyErr_Occurred()) {
goto exit;
}
- return_value = Py_BuildValue("k", _return_value);
+ return_value = PyLong_FromUnsignedLong(_return_value);
exit:
return return_value;
@@ -595,7 +595,7 @@ _winapi_GetLastError(PyObject *module, PyObject *Py_UNUSED(ignored))
if ((_return_value == PY_DWORD_MAX) && PyErr_Occurred()) {
goto exit;
}
- return_value = Py_BuildValue("k", _return_value);
+ return_value = PyLong_FromUnsignedLong(_return_value);
exit:
return return_value;
@@ -1305,7 +1305,7 @@ _winapi_GetFileType(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P
if ((_return_value == PY_DWORD_MAX) && PyErr_Occurred()) {
goto exit;
}
- return_value = Py_BuildValue("k", _return_value);
+ return_value = PyLong_FromUnsignedLong(_return_value);
exit:
return return_value;
@@ -1479,4 +1479,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=aaf29735c47f55fe input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e1a9908bb82a6379 input=a9049054013a1b77]*/