Merge pull request #1081 from boguscoder/boguscoder-lua

Make TracyLua buildable with TRACY_NO_CALLSTACK
This commit is contained in:
Bartosz Taudul
2025-06-21 00:12:12 +02:00
committed by GitHub

View File

@@ -145,6 +145,13 @@ TRACY_API LuaZoneState& GetLuaZoneState();
namespace detail
{
static inline void LuaShortenSrc( char* dst, const char* src )
{
size_t l = std::min( (size_t)255, strlen( src ) );
memcpy( dst, src, l );
dst[l] = 0;
}
#ifdef TRACY_HAS_CALLSTACK
static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )
{
@@ -190,13 +197,6 @@ static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )
TracyQueueCommit( callstackAllocFatThread );
}
static inline void LuaShortenSrc( char* dst, const char* src )
{
size_t l = std::min( (size_t)255, strlen( src ) );
memcpy( dst, src, l );
dst[l] = 0;
}
static inline int LuaZoneBeginS( lua_State* L )
{
#ifdef TRACY_ON_DEMAND