BREAKING: Replace custom import() with normal Lua require(). (#5014)

* Use require() instead of a custom import()

* Also search relative to the current file

* Update documentation
This commit is contained in:
Mm2PL
2023-12-16 13:16:54 +01:00
committed by GitHub
parent bbf75516ed
commit 5f8c4c6b66
6 changed files with 131 additions and 71 deletions
+4 -1
View File
@@ -20,9 +20,12 @@ int c2_log(lua_State *L);
// These ones are global
int g_load(lua_State *L);
int g_print(lua_State *L);
int g_import(lua_State *L);
// NOLINTEND(readability-identifier-naming)
// This is for require() exposed as an element of package.searchers
int searcherAbsolute(lua_State *L);
int searcherRelative(lua_State *L);
// Exposed as c2.LogLevel
// Represents "calls" to qCDebug, qCInfo ...
enum class LogLevel { Debug, Info, Warning, Critical };