Print a warning when luaL_resourcetryagain force triggers garbage collector

This commit is contained in:
indev authored and Alug committed 2025-12-02 19:05:17 +01:00
1 parent 971c59bd20
commit 3c5905d6f7
1 file changed
+1
+1
View File
@@ -124,6 +124,7 @@ LUALIB_API int luaL_resourcetryagain (lua_State *L) {
#endif
if (errno == EMFILE || errno == ENFILE || errno == ENOMEM) {
CONS_Alert(CONS_WARNING, "%s, force calling lua garbage collector\n", strerror(errno));
lua_gc(L, LUA_GCCOLLECT, 0); /* try to release resources with a full GC */
return 1; /* signal to try again the creation */
}