aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_internal.cpp
AgeCommit message (Collapse)Author
2022-05-02Async environment for mods to do concurrent tasks (#11131)sfan5
2021-09-10Clean up/improve some scriptapi error handling codesfan5
2021-08-21HUD: Reject and warn on invalid stat types (#11548)SmallJoker
This comes into play on older servers which do not know the "stat" type. Warnings are only logged once to avoid spam within globalstep callbacks
2020-10-31Fix segfault in deprecation logging due to tail call, log by default (#10174)rubenwardy
2020-04-22Fix configuration caching in log_deprecated (#9697)HybridDog
* Fix configuration caching in log_deprecated The configured variable was never set to true. I've set the variables to thread_local because the configuration should be reloaded after reentering the world from mainmenu.
2020-04-04Fix 'the the' typos in comments (#9554)LNJ
2020-02-23Refactor Script API's log_deprecatedsfan5
2018-11-28Clean up stack after script_get_backtrace (#7854)Michael Muller
script_get_backtrace() was leaving its return value on the stack, corrupting subsequent lua operations for functions that did not immediately return. This problem can specifically be observed in the case of multiple "groupcaps" entries, each of which provides the legacy "maxwear" property. These cause a backtrace and thus pollute the stack for the following lua_next() call.
2018-07-22Add a MSVC / Windows compatible snprintf function (#7353)nOOb3167
Use sizeof where applicable for mt_snprintf
2018-05-14Fix segfault in player migration and crash in log_deprecatedSmallJoker
Makes log_deprecated work when triggered from no function
2017-11-27Hint at problematic code when logging deprecated callssfan5
2017-06-30Create a filesystem abstraction layer for CSM and only allow accessing files ↵red-001
that are scanned into it. (#5965) * Load client-side mods into memory before executing them. This removes the remaining filesystem access that client-sided mods had and it will hopefully make then more secure. * Lua Virtual filesystem: don't load the files into memory just scan the filenames into memory. * Fix the issues with backtrace * fix most of the issues * fix code style. * add a comment
2015-10-17Fix crash regression when invsize formspec gets usedest31
The invsize formspec element is outdated. Even though, it is still supported, only a deprecation warning is shown, introduced by commit [1]. The lua context passed to the log_deprecated method added by commit [1] is NULL for the invsize deprecation warning, as its run on the client and not the server. Commit [1] has removed checks for NULL inside the log_deprecated method, resulting in a crash when a formspec with an invsize element is parsed. This commit puts the check back. Fixes #3260. Referenced commits: [1]: b5acec0a3c5701c53854ff7afdf4008863e6e8df "Add proper lua api deprecated handling" [2]: 7b8d372947aae232ddf598155e972bb4dda157a "Use warningstream for deprecated field messages and refactor log_deprecated"
2015-10-15Use warningstream for deprecated field messages and refactor log_deprecatedShadowNinja
2015-08-27Push error handler afresh each time lua_pcall is usedKahrl
Fixes "double fault" / "error in error handling" messages (issue #1423) and instead shows a complete backtrace.
2015-08-12SAPI: Track last executed mod and include in error messageskwolekr
2015-08-10Display Lua memory usage at the time of Out-of-Memory errorkwolekr
Also misc. minor cleanups
2015-08-05Improve Script CPP API diagnosticskwolekr
2015-05-16Add mod securityShadowNinja
Due to compatibility concerns, this is temporarily disabled.
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2014-08-23Fix LuaJIT exception wrapperKahrl
2014-05-08Use "core" namespace internallyShadowNinja
2014-04-29Add proper lua api deprecated handlingsapier
2014-03-15Remove lua_State parameter from LuaError::LuaErrorShadowNinja
2014-03-15Revert "Make sure we get a stacktrace for as many lua errors as possible"ShadowNinja
This reverts commit 362ef5f6ced862daa4733034810d0b07e2ad5d89. Stack tracebacks couldn't be generated in LuaError::LuaError anyway and this caused a second, empty traceback in most cases. In cases where there wasn't annother traceback the stack had already unwound and the traceback was empty.
2014-03-15Make sure we get a stacktrace for as many lua errors as possibleSfan5
2013-12-18Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja
2013-12-07Move script_run_callbacks to LuaShadowNinja
2013-11-21Fix possible implicit conversion of NULL to std::stringkwolekr
2013-11-15Pass a errfunc to lua_pcall to get a tracebackShadowNinja
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-05-25Move scriptapi to separate folder (by sapier)sapier
On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)