Make TracyLua buildable with TRACY_NO_CALLSTACK

See discussion https://github.com/wolfpld/tracy/issues/1080
This commit is contained in:
Oleg Bogdanov
2025-06-20 12:45:54 -07:00
committed by GitHub
parent 8caf4f0d60
commit 4f9107fac5

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