From 3e88544d1fb81b1e85f5cac62170a158fc930130 Mon Sep 17 00:00:00 2001 From: "Igor S. Gerasimov" Date: Thu, 2 Jan 2025 21:44:06 +0100 Subject: [PATCH] Update int type in Python API --- python/bindings/Memory.hpp | 2 +- python/bindings/Module.cpp | 2 +- python/bindings/ScopedZone.hpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/bindings/Memory.hpp b/python/bindings/Memory.hpp index 91430ca9..9bd7b2f7 100644 --- a/python/bindings/Memory.hpp +++ b/python/bindings/Memory.hpp @@ -7,7 +7,7 @@ namespace py = pybind11; #include "tracy/Tracy.hpp" using OptionalString = std::optional; -using OptionalInt = std::optional; +using OptionalInt = std::optional; #ifdef TRACY_ENABLE template diff --git a/python/bindings/Module.cpp b/python/bindings/Module.cpp index 0a13b836..631dcf68 100644 --- a/python/bindings/Module.cpp +++ b/python/bindings/Module.cpp @@ -820,7 +820,7 @@ PYBIND11_MODULE(TracyClientBindings, m) { m.def( "_plot_config", - [](const std::string &name, int type, bool step, bool fill, + [](const std::string &name, int32_t type, bool step, bool fill, uint32_t color = 0) { if (!tracy::IsEnabled()) return static_cast(0ul); auto entry = NameBuffer::Add(name); diff --git a/python/bindings/ScopedZone.hpp b/python/bindings/ScopedZone.hpp index 98e8fafb..72bca106 100644 --- a/python/bindings/ScopedZone.hpp +++ b/python/bindings/ScopedZone.hpp @@ -27,7 +27,7 @@ bool SetText(const std::string& text, tracy::ScopedZone* zone) { class PyScopedZone { public: PyScopedZone(const std::optional& name, uint32_t color, - std::optional depth, bool active, + std::optional depth, bool active, const std::string& function, const std::string& source, uint32_t line) : m_name(name), @@ -88,7 +88,7 @@ class PyScopedZone { private: std::optional m_name; uint32_t m_color; - std::optional m_depth; + std::optional m_depth; bool m_active; std::string m_function; @@ -101,7 +101,7 @@ class PyScopedZone { class PyScopedZone { public: - PyScopedZone(const std::optional&, uint32_t, std::optional, + PyScopedZone(const std::optional&, uint32_t, std::optional, bool, const std::string&, const std::string&, uint32_t line) {} virtual ~PyScopedZone(){};