mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-89545: Updates platform module to use new internal _wmi module on Windows to directly query OS properties (GH-96289)
This commit is contained in:
parent
4114bcc9ef
commit
de33df27aa
17 changed files with 856 additions and 88 deletions
|
@ -527,6 +527,7 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(protocol)
|
||||
STRUCT_FOR_ID(ps1)
|
||||
STRUCT_FOR_ID(ps2)
|
||||
STRUCT_FOR_ID(query)
|
||||
STRUCT_FOR_ID(quotetabs)
|
||||
STRUCT_FOR_ID(r)
|
||||
STRUCT_FOR_ID(raw)
|
||||
|
|
7
Include/internal/pycore_runtime_init_generated.h
generated
7
Include/internal/pycore_runtime_init_generated.h
generated
|
@ -1036,6 +1036,7 @@ extern "C" {
|
|||
INIT_ID(protocol), \
|
||||
INIT_ID(ps1), \
|
||||
INIT_ID(ps2), \
|
||||
INIT_ID(query), \
|
||||
INIT_ID(quotetabs), \
|
||||
INIT_ID(r), \
|
||||
INIT_ID(raw), \
|
||||
|
@ -2377,6 +2378,8 @@ _PyUnicode_InitStaticStrings(void) {
|
|||
PyUnicode_InternInPlace(&string);
|
||||
string = &_Py_ID(ps2);
|
||||
PyUnicode_InternInPlace(&string);
|
||||
string = &_Py_ID(query);
|
||||
PyUnicode_InternInPlace(&string);
|
||||
string = &_Py_ID(quotetabs);
|
||||
PyUnicode_InternInPlace(&string);
|
||||
string = &_Py_ID(r);
|
||||
|
@ -6680,6 +6683,10 @@ _PyStaticObjects_CheckRefcnt(void) {
|
|||
_PyObject_Dump((PyObject *)&_Py_ID(ps2));
|
||||
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
|
||||
};
|
||||
if (Py_REFCNT((PyObject *)&_Py_ID(query)) < _PyObject_IMMORTAL_REFCNT) {
|
||||
_PyObject_Dump((PyObject *)&_Py_ID(query));
|
||||
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
|
||||
};
|
||||
if (Py_REFCNT((PyObject *)&_Py_ID(quotetabs)) < _PyObject_IMMORTAL_REFCNT) {
|
||||
_PyObject_Dump((PyObject *)&_Py_ID(quotetabs));
|
||||
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue