pub fn gc_inc(&self, pause: c_int, step_multiplier: c_int, step_size: c_int) -> GCMode {
        let state = self.main_state;

        #[cfg(any(
            feature = "lua53",
            feature = "lua52",
            feature = "lua51",
            feature = "luajit",
            feature = "luau"
        ))]
        unsafe {
            if pause > 0 {
                #[cfg(not(feature = "luau"))]
                ffi::lua_gc(state, ffi::LUA_GCSETPAUSE, pause);
                #[cfg(feature = "luau")]
                ffi::lua_gc(state, ffi::LUA_GCSETGOAL, pause);
            }

            if step_multiplier > 0 {
                ffi::lua_gc(state, ffi::LUA_GCSETSTEPMUL, step_multiplier);
            }

            #[cfg(feature = "luau")]
            if step_size > 0 {
                ffi::lua_gc(state, ffi::LUA_GCSETSTEPSIZE, step_size);
            }
            #[cfg(not(feature = "luau"))]
            let _ = step_size; // Ignored

            GCMode::Incremental
        }

        #[cfg(feature = "lua54")]
        let prev_mode =
            unsafe { ffi::lua_gc(state, ffi::LUA_GCINC, pause, step_multiplier, step_size) };
        #[cfg(feature = "lua54")]
        match prev_mode {
            ffi::LUA_GCINC => GCMode::Incremental,
            ffi::LUA_GCGEN => GCMode::Generational,
            _ => unreachable!(),
        }
    }
/// Changes the collector to incremental mode with the given parameters.
///
/// Returns the previous mode (always `GCMode::Incremental` in Lua < 5.4).
/// More information can be found in the Lua [documentation].
///
/// [documentation]: https://www.lua.org/manual/5.4/manual.html#2.5.1
Changes the collector to incremental mode with the given parameters.
Returns the previous mode (always `GCMode::Incremental` in Lua < 5.4).
More information can be found in the Lua [documentation].


Changes the collector to incremental mode with the given parameters . Returns the previous mode ( always ` GCMode :: Incremental ` in Lua < 5 . 4 ) . More information can be found in the Lua [ documentation ] .
pub fn gc_inc(&self, pause: c_int, step_multiplier: c_int, step_size: c_int) -> GCMode {
        let state = self.main_state;
        #[cfg(any(
            feature = "lua53",
            feature = "lua52",
            feature = "lua51",
            feature = "luajit",
            feature = "luau"
        ))]
        unsafe {
            if pause > 0 {
                #[cfg(not(feature = "luau"))]
                ffi::lua_gc(state, ffi::LUA_GCSETPAUSE, pause);
                #[cfg(feature = "luau")]
                ffi::lua_gc(state, ffi::LUA_GCSETGOAL, pause);
            }
            if step_multiplier > 0 {
                ffi::lua_gc(state, ffi::LUA_GCSETSTEPMUL, step_multiplier);
            }
            #[cfg(feature = "luau")]
            if step_size > 0 {
                ffi::lua_gc(state, ffi::LUA_GCSETSTEPSIZE, step_size);
            }
            #[cfg(not(feature = "luau"))]
            let _ = step_size; // Ignored
            GCMode::Incremental
        }
        #[cfg(feature = "lua54")]
        let prev_mode =
            unsafe { ffi::lua_gc(state, ffi::LUA_GCINC, pause, step_multiplier, step_size) };
        #[cfg(feature = "lua54")]
        match prev_mode {
            ffi::LUA_GCINC => GCMode::Incremental,
            ffi::LUA_GCGEN => GCMode::Generational,
            _ => unreachable!(),
        }
    }
pub fn gc_inc ( & self , pause : c_int , step_multiplier : c_int , step_size : c_int ) -> GCMode { let state = self . main_state ; # [ cfg ( any ( feature " " feature " " feature " " feature " " feature " " ) ) ] unsafe { if pause > 0 { # [ cfg ( not ( feature " " ) ) ] ffi :: lua_gc ( state , ffi :: LUA_GCSETPAUSE , pause ) ; # [ cfg ( feature " " ) ] ffi :: lua_gc ( state , ffi :: LUA_GCSETGOAL , pause ) ; } if step_multiplier > 0 { ffi :: lua_gc ( state , ffi :: LUA_GCSETSTEPMUL , step_multiplier ) ; } # [ cfg ( feature " " ) ] if step_size > 0 { ffi :: lua_gc ( state , ffi :: LUA_GCSETSTEPSIZE , step_size ) ; } # [ cfg ( not ( feature " " ) ) ] let _ = step_size ; // Ignored GCMode :: Incremental } # [ cfg ( feature " " ) ] let prev_mode = unsafe { ffi :: lua_gc ( state , ffi :: LUA_GCINC , pause , step_multiplier , step_size ) } ; # [ cfg ( feature " " ) ] match prev_mode { ffi :: LUA_GCINC => GCMode :: Incremental , ffi :: LUA_GCGEN => GCMode :: Generational , _ => unreachable ! ( ) , } }
Changes the collector to incremental mode with the given parameters.
Changes the collector to incremental mode with the given parameters .
&self
pause
c_int
step_multiplier
c_int
step_size
c_int
&self
pause
c_int
step_multiplier
c_int
step_size
c_int