gh-102519: Add os.listdrives, os.listvolumes and os.listmounts on Windows (GH-102544)

This commit is contained in:
Steve Dower 2023-03-10 12:21:37 +00:00 committed by GitHub
parent 2999e02836
commit cb35882773
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 375 additions and 1 deletions

View file

@ -1216,6 +1216,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(value));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(values));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(version));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(volume));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(warnings));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(warnoptions));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(wbits));

View file

@ -702,6 +702,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(value)
STRUCT_FOR_ID(values)
STRUCT_FOR_ID(version)
STRUCT_FOR_ID(volume)
STRUCT_FOR_ID(warnings)
STRUCT_FOR_ID(warnoptions)
STRUCT_FOR_ID(wbits)

View file

@ -1208,6 +1208,7 @@ extern "C" {
INIT_ID(value), \
INIT_ID(values), \
INIT_ID(version), \
INIT_ID(volume), \
INIT_ID(warnings), \
INIT_ID(warnoptions), \
INIT_ID(wbits), \

View file

@ -1310,6 +1310,8 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(version);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(volume);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(warnings);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(warnoptions);