mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Use rust signal module directly
This commit is contained in:
@@ -94,7 +94,7 @@ pub fn get_module_inits() -> HashMap<String, StdlibInitFunc> {
|
||||
modules.insert("_io".to_string(), Box::new(io::make_module));
|
||||
modules.insert("_os".to_string(), Box::new(os::make_module));
|
||||
modules.insert("socket".to_string(), Box::new(socket::make_module));
|
||||
modules.insert("_signal".to_string(), Box::new(signal::make_module));
|
||||
modules.insert("signal".to_string(), Box::new(signal::make_module));
|
||||
}
|
||||
|
||||
// Unix-only
|
||||
|
||||
@@ -79,7 +79,7 @@ pub fn check_signals(vm: &VirtualMachine) {
|
||||
pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
|
||||
let ctx = &vm.ctx;
|
||||
|
||||
py_module!(vm, "_signal", {
|
||||
py_module!(vm, "signal", {
|
||||
"signal" => ctx.new_rustfunc(signal),
|
||||
"getsignal" => ctx.new_rustfunc(getsignal)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user