Gate i128/u128 for wasm32 target.

This commit is contained in:
Stephen Chung
2020-06-17 16:50:46 +08:00
parent e095a87ea2
commit ae6d5e13a9
8 changed files with 127 additions and 41 deletions

View File

@@ -70,8 +70,12 @@ def_package!(crate:BasicMathPackage:"Basic mathematic functions.", lib, {
lib.set_fn_1("to_float", |x: u32| Ok(x as FLOAT));
lib.set_fn_1("to_float", |x: i64| Ok(x as FLOAT));
lib.set_fn_1("to_float", |x: u64| Ok(x as FLOAT));
lib.set_fn_1("to_float", |x: i128| Ok(x as FLOAT));
lib.set_fn_1("to_float", |x: u128| Ok(x as FLOAT));
#[cfg(not(target_arch = "wasm32"))]
{
lib.set_fn_1("to_float", |x: i128| Ok(x as FLOAT));
lib.set_fn_1("to_float", |x: u128| Ok(x as FLOAT));
}
}
}