mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Thank you clang-format for at least having a diff
This commit is contained in:
parent
0cbac04529
commit
6e67890152
2 changed files with 5 additions and 5 deletions
|
@ -162,10 +162,10 @@ int c2_log(lua_State *L)
|
||||||
|
|
||||||
int g_load(lua_State *L)
|
int g_load(lua_State *L)
|
||||||
{
|
{
|
||||||
#ifdef NDEBUG
|
# ifdef NDEBUG
|
||||||
luaL_error(L, "load() is only usable in debug mode");
|
luaL_error(L, "load() is only usable in debug mode");
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
# else
|
||||||
auto countArgs = lua_gettop(L);
|
auto countArgs = lua_gettop(L);
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
if (lua::peek(L, &data, 1))
|
if (lua::peek(L, &data, 1))
|
||||||
|
@ -203,7 +203,7 @@ int g_load(lua_State *L)
|
||||||
lua_call(L, countArgs, LUA_MULTRET);
|
lua_call(L, countArgs, LUA_MULTRET);
|
||||||
|
|
||||||
return lua_gettop(L);
|
return lua_gettop(L);
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int g_dofile(lua_State *L)
|
int g_dofile(lua_State *L)
|
||||||
|
|
|
@ -171,10 +171,10 @@ void PluginController::openLibrariesFor(lua_State *L,
|
||||||
|
|
||||||
// possibly randomize this name at runtime to prevent some attacks?
|
// possibly randomize this name at runtime to prevent some attacks?
|
||||||
|
|
||||||
#ifndef NDEBUG
|
# ifndef NDEBUG
|
||||||
lua_getfield(L, gtable, "load");
|
lua_getfield(L, gtable, "load");
|
||||||
lua_setfield(L, LUA_REGISTRYINDEX, "real_load");
|
lua_setfield(L, LUA_REGISTRYINDEX, "real_load");
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
lua_getfield(L, gtable, "dofile");
|
lua_getfield(L, gtable, "dofile");
|
||||||
lua_setfield(L, LUA_REGISTRYINDEX, "real_dofile");
|
lua_setfield(L, LUA_REGISTRYINDEX, "real_dofile");
|
||||||
|
|
Loading…
Reference in a new issue