Skip to content

Commit be89f22

Browse files
authored
Merge pull request wolfpld#1081 from boguscoder/boguscoder-lua
Make TracyLua buildable with TRACY_NO_CALLSTACK
2 parents 8caf4f0 + 4f9107f commit be89f22

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

public/tracy/TracyLua.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ TRACY_API LuaZoneState& GetLuaZoneState();
145145
namespace detail
146146
{
147147

148+
static inline void LuaShortenSrc( char* dst, const char* src )
149+
{
150+
size_t l = std::min( (size_t)255, strlen( src ) );
151+
memcpy( dst, src, l );
152+
dst[l] = 0;
153+
}
154+
148155
#ifdef TRACY_HAS_CALLSTACK
149156
static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )
150157
{
@@ -190,13 +197,6 @@ static tracy_force_inline void SendLuaCallstack( lua_State* L, uint32_t depth )
190197
TracyQueueCommit( callstackAllocFatThread );
191198
}
192199

193-
static inline void LuaShortenSrc( char* dst, const char* src )
194-
{
195-
size_t l = std::min( (size_t)255, strlen( src ) );
196-
memcpy( dst, src, l );
197-
dst[l] = 0;
198-
}
199-
200200
static inline int LuaZoneBeginS( lua_State* L )
201201
{
202202
#ifdef TRACY_ON_DEMAND

0 commit comments

Comments
 (0)