Skip to main content

luaur_vm/macros/
otherwhite.rs

1use crate::macros::whitebits::WHITEBITS;
2
3#[allow(non_snake_case)]
4#[macro_export]
5macro_rules! otherwhite {
6    ($g:expr) => {{
7        unsafe { (*$g).currentwhite as i32 ^ $crate::macros::whitebits::WHITEBITS }
8    }};
9}
10
11pub use otherwhite;
12
13#[allow(non_snake_case)]
14#[macro_export]
15macro_rules! isdead {
16    ($g:expr, $v:expr) => {{
17        unsafe {
18            (((*($v as *const $crate::records::g_cheader::GCheader)).marked as i32
19                & ($crate::macros::whitebits::WHITEBITS
20                    | $crate::macros::bitmask::bitmask($crate::macros::fixedbit::FIXEDBIT)))
21                == ($crate::macros::otherwhite::otherwhite!($g)
22                    & $crate::macros::whitebits::WHITEBITS))
23        }
24    }};
25}
26
27pub use isdead;