Skip to content

Commit 9dea9b8

Browse files
committed
fix: add cfg wasm32
1 parent 57714d0 commit 9dea9b8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

vm/src/stdlib/signal.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ pub(crate) mod _signal {
283283
/// Similar to `PyErr_SetInterruptEx` in CPython
284284
///
285285
/// Missing signal handler for the given signal number is silently ignored.
286+
#[allow(dead_code)]
286287
pub fn set_interrupt_ex(signum: i32, vm: &VirtualMachine) -> PyResult<()> {
287288
assert_in_range(signum, vm)?;
288289

vm/src/stdlib/thread.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ pub(crate) mod _thread {
304304
vm.state.thread_count.fetch_sub(1);
305305
}
306306

307+
#[cfg(not(target_arch = "wasm32"))]
307308
#[pyfunction]
308309
fn interrupt_main(signum: OptionalArg<i32>, vm: &VirtualMachine) -> PyResult<()> {
309310
crate::stdlib::signal::_signal::set_interrupt_ex(signum.unwrap_or(libc::SIGINT), vm)

0 commit comments

Comments
 (0)