mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 05:03:53 +00:00
Update int type in Python API
This commit is contained in:
parent
7093eb0b08
commit
3e88544d1f
@ -7,7 +7,7 @@ namespace py = pybind11;
|
|||||||
#include "tracy/Tracy.hpp"
|
#include "tracy/Tracy.hpp"
|
||||||
|
|
||||||
using OptionalString = std::optional<std::string>;
|
using OptionalString = std::optional<std::string>;
|
||||||
using OptionalInt = std::optional<int>;
|
using OptionalInt = std::optional<int32_t>;
|
||||||
|
|
||||||
#ifdef TRACY_ENABLE
|
#ifdef TRACY_ENABLE
|
||||||
template <typename Type = uint64_t>
|
template <typename Type = uint64_t>
|
||||||
|
@ -820,7 +820,7 @@ PYBIND11_MODULE(TracyClientBindings, m) {
|
|||||||
|
|
||||||
m.def(
|
m.def(
|
||||||
"_plot_config",
|
"_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) {
|
uint32_t color = 0) {
|
||||||
if (!tracy::IsEnabled()) return static_cast<OptionalNumber>(0ul);
|
if (!tracy::IsEnabled()) return static_cast<OptionalNumber>(0ul);
|
||||||
auto entry = NameBuffer::Add(name);
|
auto entry = NameBuffer::Add(name);
|
||||||
|
@ -27,7 +27,7 @@ bool SetText(const std::string& text, tracy::ScopedZone* zone) {
|
|||||||
class PyScopedZone {
|
class PyScopedZone {
|
||||||
public:
|
public:
|
||||||
PyScopedZone(const std::optional<std::string>& name, uint32_t color,
|
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,
|
const std::string& function, const std::string& source,
|
||||||
uint32_t line)
|
uint32_t line)
|
||||||
: m_name(name),
|
: m_name(name),
|
||||||
@ -88,7 +88,7 @@ class PyScopedZone {
|
|||||||
private:
|
private:
|
||||||
std::optional<std::string> m_name;
|
std::optional<std::string> m_name;
|
||||||
uint32_t m_color;
|
uint32_t m_color;
|
||||||
std::optional<int> m_depth;
|
std::optional<int32_t> m_depth;
|
||||||
bool m_active;
|
bool m_active;
|
||||||
|
|
||||||
std::string m_function;
|
std::string m_function;
|
||||||
@ -101,7 +101,7 @@ class PyScopedZone {
|
|||||||
|
|
||||||
class PyScopedZone {
|
class PyScopedZone {
|
||||||
public:
|
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) {}
|
bool, const std::string&, const std::string&, uint32_t line) {}
|
||||||
virtual ~PyScopedZone(){};
|
virtual ~PyScopedZone(){};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user