Lua/LuaInstance: Improve code
Former-commit-id: a998449fae2d50541ab4c5d1c68d9dff4e7238a6 [formerly a5734fdf64bc9d8acbe1d0923d70ddc553b3a14b] [formerly 4da841f9961603fffdf6c1112610d082db361ce7 [formerly d9cea98d520bef475ea472b4b0eceb5881ee6c90]] Former-commit-id: be40337660be3bc317c4f2def0e301ac2e0a0834 [formerly b08c4c9ca758ccdd92ad0f6fbbbd5a5f7ea70b58] Former-commit-id: 32908cf086667a25ea718f62a240d0d44628b016
This commit is contained in:
@@ -92,16 +92,16 @@ namespace Nz
|
||||
LuaType GetField(const String& fieldName, int tableIndex = -1) const;
|
||||
LuaType GetGlobal(const char* name) const;
|
||||
LuaType GetGlobal(const String& name) const;
|
||||
lua_State* GetInternalState() const;
|
||||
String GetLastError() const;
|
||||
UInt32 GetMemoryLimit() const;
|
||||
UInt32 GetMemoryUsage() const;
|
||||
inline lua_State* GetInternalState() const;
|
||||
inline String GetLastError() const;
|
||||
inline std::size_t GetMemoryLimit() const;
|
||||
inline std::size_t GetMemoryUsage() const;
|
||||
LuaType GetMetatable(const char* tname) const;
|
||||
LuaType GetMetatable(const String& tname) const;
|
||||
bool GetMetatable(int index) const;
|
||||
unsigned int GetStackTop() const;
|
||||
LuaType GetTable(int index = -2) const;
|
||||
UInt32 GetTimeLimit() const;
|
||||
inline UInt32 GetTimeLimit() const;
|
||||
LuaType GetType(int index) const;
|
||||
const char* GetTypeName(LuaType type) const;
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace Nz
|
||||
void PushString(const char* str) const;
|
||||
void PushString(const char* str, std::size_t size) const;
|
||||
void PushString(const String& str) const;
|
||||
void PushTable(unsigned int sequenceElementCount = 0, unsigned int arrayElementCount = 0) const;
|
||||
void PushTable(std::size_t sequenceElementCount = 0, std::size_t arrayElementCount = 0) const;
|
||||
void* PushUserdata(std::size_t size) const;
|
||||
void PushValue(int index) const;
|
||||
|
||||
|
||||
@@ -25,6 +25,31 @@ namespace Nz
|
||||
instance.m_state = nullptr;
|
||||
}
|
||||
|
||||
inline lua_State* LuaInstance::GetInternalState() const
|
||||
{
|
||||
return m_state;
|
||||
}
|
||||
|
||||
inline String LuaInstance::GetLastError() const
|
||||
{
|
||||
return m_lastError;
|
||||
}
|
||||
|
||||
inline std::size_t LuaInstance::GetMemoryLimit() const
|
||||
{
|
||||
return m_memoryLimit;
|
||||
}
|
||||
|
||||
inline std::size_t LuaInstance::GetMemoryUsage() const
|
||||
{
|
||||
return m_memoryUsage;
|
||||
}
|
||||
|
||||
inline UInt32 LuaInstance::GetTimeLimit() const
|
||||
{
|
||||
return m_timeLimit;
|
||||
}
|
||||
|
||||
inline LuaInstance& LuaInstance::operator=(LuaInstance&& instance) noexcept
|
||||
{
|
||||
m_clock = std::move(m_clock);
|
||||
|
||||
Reference in New Issue
Block a user