Luanti 5.18.0-dev
Loading...
Searching...
No Matches
s_base.cpp File Reference
#include "cpp_api/s_base.h"
#include "cpp_api/s_internal.h"
#include "cpp_api/s_security.h"
#include "debug.h"
#include "lua_api/l_object.h"
#include "common/c_converter.h"
#include "server/player_sao.h"
#include "filesys.h"
#include "porting.h"
#include "server.h"
#include "lualib.h"
#include "bit.h"
#include "lstrpack.h"
#include "script/common/c_content.h"
#include <limits>
Include dependency graph for s_base.cpp:

Classes

class  ModNameStorer

Macros

#define CHECK(ridx, name)

Functions

static void rawgetfield (lua_State *L, int index, std::string_view k)
 like lua_getfield but bypasses metamethods
static void rawsetfield (lua_State *L, int index, std::string_view k)
 like lua_setfield but bypasses metamethods

Macro Definition Documentation

◆ CHECK

#define CHECK ( ridx,
name )
Value:
do { \
lua_rawgeti(L, LUA_REGISTRYINDEX, ridx); \
FATAL_ERROR_IF(lua_type(L, -1) != LUA_TFUNCTION, "missing " name); \
lua_pop(L, 1); \
} while (0)

Referenced by ScriptApiBase::checkSetByBuiltin(), LEFT_HANDED(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().

Function Documentation

◆ rawgetfield()

void rawgetfield ( lua_State * L,
int index,
std::string_view k )
static

like lua_getfield but bypasses metamethods

Referenced by ScriptApiBase::addObjectReference().

Here is the caller graph for this function:

◆ rawsetfield()

void rawsetfield ( lua_State * L,
int index,
std::string_view k )
static

like lua_setfield but bypasses metamethods

Referenced by ScriptApiBase::addObjectReference(), and ScriptApiBase::removeObjectReference().

Here is the caller graph for this function: