Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
l_settings.cpp File Reference
#include "lua_api/l_settings.h"
#include "lua_api/l_internal.h"
#include "cpp_api/s_security.h"
#include "threading/mutex_auto_lock.h"
#include "util/string.h"
#include "settings.h"
#include "noise.h"
#include "log.h"
+ Include dependency graph for l_settings.cpp:

Macros

#define CHECK_SETTING_SECURITY(L, name)
 

Functions

static int checkSettingSecurity (lua_State *L, const std::string &name)
 
static void push_settings_table (lua_State *L, const Settings *settings)
 

Macro Definition Documentation

◆ CHECK_SETTING_SECURITY

#define CHECK_SETTING_SECURITY ( L,
name )
Value:
if (o->m_settings == g_settings) { \
if (checkSettingSecurity(L, name) == -1) \
return 0; \
}
static int checkSettingSecurity(lua_State *L, const std::string &name)
Definition l_settings.cpp:28
Settings * g_settings
Definition settings.cpp:22

Referenced by LuaSettings::l_remove(), LuaSettings::l_set(), LuaSettings::l_set_bool(), and LuaSettings::l_set_np_group().

Function Documentation

◆ checkSettingSecurity()

static int checkSettingSecurity ( lua_State * L,
const std::string & name )
inlinestatic

References errorstream, infostream, ScriptApiSecurity::isSecure(), and script_get_backtrace().

+ Here is the call graph for this function:

◆ push_settings_table()

static void push_settings_table ( lua_State * L,
const Settings * settings )
static

References push_settings_table(), and settings.

Referenced by LuaSettings::l_to_table(), and push_settings_table().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: