MCPcopy Index your code
hub / github.com/RustPython/RustPython / DisableReflectionKey

Function DisableReflectionKey

crates/vm/src/stdlib/winreg.rs:1067–1074  ·  view source on GitHub ↗
(key: PyRef<PyHkey>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1065
1066 #[pyfunction]
1067 fn DisableReflectionKey(key: PyRef<PyHkey>, vm: &VirtualMachine) -> PyResult<()> {
1068 let res = unsafe { Registry::RegDisableReflectionKey(key.hkey.load()) };
1069 if res == 0 {
1070 Ok(())
1071 } else {
1072 Err(vm.new_os_error(format!("error code: {res}")))
1073 }
1074 }
1075
1076 #[pyfunction]
1077 fn EnableReflectionKey(key: PyRef<PyHkey>, vm: &VirtualMachine) -> PyResult<()> {

Callers 3

Calls 3

new_os_errorMethod · 0.80
ErrClass · 0.50
loadMethod · 0.45

Tested by 3