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

Function set_events

crates/vm/src/stdlib/sys/monitoring.rs:627–635  ·  view source on GitHub ↗
(tool_id: i32, event_set: i32, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

625}
626
627fn set_events(tool_id: i32, event_set: i32, vm: &VirtualMachine) -> PyResult<()> {
628 let tool = check_valid_tool(tool_id, vm)?;
629 check_tool_in_use(tool, vm)?;
630 let normalized = normalize_event_set(event_set, false, vm)?;
631 let mut state = vm.state.monitoring.lock();
632 state.global_events[tool] = normalized;
633 update_events_mask(vm, &state);
634 Ok(())
635}
636
637fn get_local_events(tool_id: i32, code: PyObjectRef, vm: &VirtualMachine) -> PyResult<u32> {
638 if code.downcast_ref::<PyCode>().is_none() {

Callers 1

test_funcMethod · 0.85

Calls 5

check_valid_toolFunction · 0.85
check_tool_in_useFunction · 0.85
normalize_event_setFunction · 0.85
update_events_maskFunction · 0.85
lockMethod · 0.45

Tested by 1

test_funcMethod · 0.68