summaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorjussi2023-11-15 18:34:34 +0200
committerjussi2023-11-15 18:34:34 +0200
commit841aa897f1868075134162cc71593ac9c3473115 (patch)
treecc03b824d1a16a086aecc7a3246d9b434b7d3118 /src/core.c
parent7b10306ed5c87517800a6058ad84e27c866f81c6 (diff)
downloadreilua-enhanced-841aa897f1868075134162cc71593ac9c3473115.tar.gz
reilua-enhanced-841aa897f1868075134162cc71593ac9c3473115.tar.bz2
reilua-enhanced-841aa897f1868075134162cc71593ac9c3473115.zip
GC_UNLOAD build time define and replaced with flag to change it at runtime.
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 05af7c8..c4dd818 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1254,6 +1254,17 @@ int lcoreIsGCUnloadEnabled( lua_State *L ) {
}
/*
+> 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
*/