Skip to content

Commit

Permalink
Lua/LuaState: Add RawEqual function
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed Nov 14, 2018
1 parent 23f7fe3 commit d2ddb29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Expand Up @@ -155,6 +155,7 @@ Nazara Engine:
- Added ENetHost and ENetPeer accessor to total packet/data received/sent/lost
-**Changed the way resources were Loaded, almost every LoadFromX and OpenFromX methods are now static and create the object themselves.**
- ⚠ SoundStream is now responsible for loaders instead of Music, and is now threadsafe (you can now load a stream only once and play it multiple times at the same time)
- Added LuaState::RawEqual

Nazara Development Kit:
- Added ImageWidget (#139)
Expand Down
2 changes: 2 additions & 0 deletions include/Nazara/Lua/LuaState.hpp
Expand Up @@ -157,6 +157,8 @@ namespace Nz
void* PushUserdata(std::size_t size) const;
void PushValue(int index) const;

bool RawEqual(int index1, int index2) const;

void Remove(int index) const;
void Replace(int index) const;

Expand Down
5 changes: 5 additions & 0 deletions src/Nazara/Lua/LuaState.cpp
Expand Up @@ -712,6 +712,11 @@ namespace Nz
lua_pushvalue(m_state, index);
}

bool LuaState::RawEqual(int index1, int index2) const
{
return lua_rawequal(m_state, index1, index2);
}

void LuaState::Remove(int index) const
{
lua_remove(m_state, index);
Expand Down

0 comments on commit d2ddb29

Please sign in to comment.