Skip to main content

luaur_vm/macros/
setbits.rs

1#[allow(non_snake_case)]
2#[macro_export]
3macro_rules! setbits {
4    ($x:expr, $m:expr) => {
5        // C promotes to int before |, then truncates on store
6        $x = (($x as i32) | (($m) as i32)) as _
7    };
8}
9
10pub use setbits;