mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-13 10:45:21 +01:00
Backport PUC Lua 5.4's string.{pack,unpack,packsize}
This commit is contained in:
@@ -699,6 +699,7 @@ if(BUILD_CLIENT)
|
||||
${GMP_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
${LUA_BIT_LIBRARY}
|
||||
lstrpack
|
||||
sha256
|
||||
${FREETYPE_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
@@ -789,6 +790,7 @@ if(BUILD_SERVER)
|
||||
${JSON_LIBRARY}
|
||||
${LUA_LIBRARY}
|
||||
${LUA_BIT_LIBRARY}
|
||||
lstrpack
|
||||
sha256
|
||||
${GMP_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#else
|
||||
#include "bit.h"
|
||||
#endif
|
||||
#include "lstrpack.h"
|
||||
}
|
||||
|
||||
#include "script/common/c_content.h"
|
||||
@@ -80,6 +81,9 @@ ScriptApiBase::ScriptApiBase(ScriptingType type):
|
||||
lua_pushstring(m_luastack, LUA_BITLIBNAME);
|
||||
lua_call(m_luastack, 1, 0);
|
||||
|
||||
// Load string.{pack,unpack,packsize}
|
||||
setup_lstrpack(m_luastack);
|
||||
|
||||
#if BUILD_WITH_TRACY
|
||||
// Load tracy lua bindings
|
||||
tracy::LuaRegister(m_luastack);
|
||||
|
||||
Reference in New Issue
Block a user