luaur_vm/macros/gco_2_th.rs
1use crate::enums::lua_type::lua_Type;
2use crate::macros::check_exp::check_exp;
3
4#[allow(non_snake_case)]
5#[macro_export]
6macro_rules! gco2th {
7 ($o:expr) => {{
8 unsafe {
9 $crate::macros::check_exp::check_exp!(
10 (*$o).gch.tt == ($crate::enums::lua_type::lua_Type::LUA_TTHREAD as u8),
11 core::ptr::addr_of_mut!((*$o).th) as *mut $crate::records::lua_state::lua_State
12 )
13 }
14 }};
15}
16
17pub use gco2th;