gh-133711: Log Windows OEM code page in test.pythoninfo (#134840)

Add _winapi.GetOEMCP() function.
This commit is contained in:
Victor Stinner 2025-05-28 17:41:11 +02:00 committed by GitHub
parent d83576bf48
commit d9ec0ee733
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 43 additions and 4 deletions

View file

@ -2747,6 +2747,19 @@ _winapi_GetACP_impl(PyObject *module)
return PyLong_FromUnsignedLong(GetACP());
}
/*[clinic input]
_winapi.GetOEMCP
Get the current Windows ANSI code page identifier.
[clinic start generated code]*/
static PyObject *
_winapi_GetOEMCP_impl(PyObject *module)
/*[clinic end generated code: output=4def5b07a8be1b3b input=e8caf4353a28e28e]*/
{
return PyLong_FromUnsignedLong(GetOEMCP());
}
/*[clinic input]
_winapi.GetFileType -> DWORD
@ -3007,6 +3020,7 @@ static PyMethodDef winapi_functions[] = {
_WINAPI_WAITFORSINGLEOBJECT_METHODDEF
_WINAPI_WRITEFILE_METHODDEF
_WINAPI_GETACP_METHODDEF
_WINAPI_GETOEMCP_METHODDEF
_WINAPI_GETFILETYPE_METHODDEF
_WINAPI__MIMETYPES_READ_WINDOWS_REGISTRY_METHODDEF
_WINAPI_NEEDCURRENTDIRECTORYFOREXEPATH_METHODDEF