1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Update int type in Python API

This commit is contained in:
Igor S. Gerasimov 2025-01-02 21:44:06 +01:00
parent 7093eb0b08
commit 3e88544d1f
3 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ namespace py = pybind11;
#include "tracy/Tracy.hpp"
using OptionalString = std::optional<std::string>;
using OptionalInt = std::optional<int>;
using OptionalInt = std::optional<int32_t>;
#ifdef TRACY_ENABLE
template <typename Type = uint64_t>

View File

@ -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<OptionalNumber>(0ul);
auto entry = NameBuffer::Add(name);

View File

@ -27,7 +27,7 @@ bool SetText(const std::string& text, tracy::ScopedZone* zone) {
class PyScopedZone {
public:
PyScopedZone(const std::optional<std::string>& name, uint32_t color,
std::optional<int> depth, bool active,
std::optional<int32_t> 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<std::string> m_name;
uint32_t m_color;
std::optional<int> m_depth;
std::optional<int32_t> m_depth;
bool m_active;
std::string m_function;
@ -101,7 +101,7 @@ class PyScopedZone {
class PyScopedZone {
public:
PyScopedZone(const std::optional<std::string>&, uint32_t, std::optional<int>,
PyScopedZone(const std::optional<std::string>&, uint32_t, std::optional<int32_t>,
bool, const std::string&, const std::string&, uint32_t line) {}
virtual ~PyScopedZone(){};