mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
___tracy_alloc_* take pointer-size pairs
This enables better bindings in languages that do not have 0-terminated strings for source/function name. It does not introduce any additional overhead in languages that do use 0-terminated strings, either, but it _is_ a breaking API change. Fixes https://github.com/wolfpld/tracy/issues/53
This commit is contained in:
+5
-5
@@ -1504,14 +1504,14 @@ these functions.
|
||||
|
||||
\begin{itemize}
|
||||
\item \texttt{\_\_\_tracy\_init\_thread(void)}
|
||||
\item \texttt{\_\_\_tracy\_alloc\_srcloc(uint32\_t line, const char* source, const char* function)}
|
||||
\item \texttt{\_\_\_tracy\_alloc\_srcloc\_name(uint32\_t line, const char* source, const char* function, const char* name, size\_t nameSz)}
|
||||
\item \texttt{\_\_\_tracy\_alloc\_srcloc(uint32\_t line, const char* source, size\_t sourceSz, const char* function, size\_t functionSz)}
|
||||
\item \texttt{\_\_\_tracy\_alloc\_srcloc\_name(uint32\_t line, const char* source, size\_t sourceSz, const char* function, size\_t functionSz, const char* name, size\_t nameSz)}
|
||||
\end{itemize}
|
||||
|
||||
Here \texttt{line} is line number in the \texttt{source} source file and \texttt{function} is the
|
||||
name of a function in which the zone is created. Both \texttt{source} and \texttt{function} must be
|
||||
null-terminated strings. You may additionally specify an optional zone name, by providing it in the
|
||||
\texttt{name} variable, and specifying its size in \texttt{nameSz}.
|
||||
name of a function in which the zone is created. \texttt{sourceSz} and \texttt{functionSz} are the
|
||||
size of the corresponding string arguments in bytes. You may additionally specify an optional zone
|
||||
name, by providing it in the \texttt{name} variable, and specifying its size in \texttt{nameSz}.
|
||||
|
||||
The \texttt{\_\_\_tracy\_alloc\_srcloc} and \texttt{\_\_\_tracy\_alloc\_srcloc\_name} functions
|
||||
return an \texttt{uint64\_t} source location identifier corresponding to an \emph{allocated source
|
||||
|
||||
Reference in New Issue
Block a user