luaur_vm/macros/lua_c_check_gc.rs
1//! Source: `VM/src/lgc.h:77` (hand-ported)
2// #define luaC_checkGC(L)
3// { condhardstacktests(...); if (luaC_needsGC(L)) { condhardmemtests(...); luaC_step(L, true); }
4// else { condhardmemtests(...); } }
5// condhard*tests are no-ops in default builds.
6#[allow(non_snake_case)]
7#[macro_export]
8macro_rules! luaC_checkGC {
9 ($L:expr) => {
10 if $crate::macros::lua_c_needs_gc::luaC_needsGC!($L) {
11 $crate::functions::lua_c_step::luaC_step($L, true);
12 }
13 };
14}
15pub use luaC_checkGC;
16#[allow(unused_imports)]
17pub use luaC_checkGC as lua_c_check_gc;