Skip to content

Commit ac57b52

Browse files
committed
Rename getwindowsversion_type
1 parent 0cc085b commit ac57b52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vm/src/sysmodule.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ fn sys_displayhook(obj: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
231231
Ok(())
232232
}
233233

234-
#[pystruct_sequence(name = "sys.getwindowsversion_type")]
234+
#[pystruct_sequence(name = "sys.getwindowsversion")]
235235
#[derive(Default, Debug)]
236236
#[cfg(windows)]
237237
struct WindowsVersion {
@@ -299,7 +299,7 @@ fn sys_getwindowsversion(vm: &VirtualMachine) -> PyResult<crate::obj::objtuple::
299299
version.dwBuildNumber,
300300
), // TODO Provide accurate version, like CPython impl
301301
}
302-
.into_struct_sequence(vm, vm.try_class("sys", "getwindowsversion_type")?)
302+
.into_struct_sequence(vm, vm.try_class("sys", "_getwindowsversion_type")?)
303303
}
304304
}
305305

@@ -523,7 +523,7 @@ settrace() -- set the global debug tracing function
523523
let getwindowsversion = WindowsVersion::make_class(ctx);
524524
extend_module!(vm, module, {
525525
"getwindowsversion" => ctx.new_function(sys_getwindowsversion),
526-
"getwindowsversion_type" => getwindowsversion,
526+
"_getwindowsversion_type" => getwindowsversion, // XXX: This is not a python spec but required by current RustPython implementation
527527
})
528528
}
529529

0 commit comments

Comments
 (0)