Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
lua_util.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
11
struct
lua_State;
12
13
namespace
scripting {
14
15
auto
pcallTraceback(lua_State* state,
int
nargs,
int
nresults)
noexcept
-> int;
16
22
class
ScriptDepthGuard {
23
public
:
24
ScriptDepthGuard()
noexcept
;
25
~ScriptDepthGuard();
26
27
ScriptDepthGuard(
const
ScriptDepthGuard&) =
delete
;
28
auto
operator=(
const
ScriptDepthGuard&) -> ScriptDepthGuard& =
delete
;
29
ScriptDepthGuard(ScriptDepthGuard&&) =
delete
;
30
auto
operator=(ScriptDepthGuard&&) -> ScriptDepthGuard& =
delete
;
31
33
[[nodiscard]]
34
auto
allowed
() const noexcept ->
bool
{
35
return
m_allowed;
36
}
37
38
private
:
39
bool
m_allowed;
40
};
41
42
}
scripting::ScriptDepthGuard::allowed
auto allowed() const noexcept -> bool
False when the limit was reached; the caller must not enter Lua.
Definition
lua_util.hpp:34
engine
src
toast
scripting
lua_util.hpp
Generated by
1.17.0