From 841aa897f1868075134162cc71593ac9c3473115 Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 15 Nov 2023 18:34:34 +0200 Subject: GC_UNLOAD build time define and replaced with flag to change it at runtime. --- src/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index 05af7c8..c4dd818 100644 --- a/src/core.c +++ b/src/core.c @@ -1253,6 +1253,17 @@ int lcoreIsGCUnloadEnabled( lua_State *L ) { return 1; } +/* +> RL.SetGCUnload( bool enabled ) + +Set Lua garbage collection to unload object data +*/ +int lcoreSetGCUnload( lua_State *L ) { + state->gcUnload = uluaGetBoolean( L, 1 ); + + return 0; +} + /* ## Core - Files management functions */ -- cgit v1.2.3