luaur_vm/macros/hvalue.rs
1use crate::macros::check_exp::check_exp;
2use crate::macros::ttistable::ttistable;
3
4#[allow(non_snake_case)]
5#[macro_export]
6macro_rules! hvalue {
7 ($o:expr) => {
8 // C++ `&(o)->value.gc->h` — a Table* into the GCObject union payload.
9 $crate::macros::check_exp::check_exp!(
10 $crate::macros::ttistable::ttistable!($o),
11 core::ptr::addr_of_mut!((*(*$o).value.gc).h)
12 as *mut $crate::records::lua_table::LuaTable
13 )
14 };
15}
16
17pub use hvalue;