fix PajeTrace context manager

This commit is contained in:
mhochsteger@cerbsim.com 2022-03-21 22:12:21 +01:00
parent fed78f2ca0
commit 54dde2a10f

View File

@ -274,8 +274,7 @@ threads : int
"size in Megabytes"
)
.def("__enter__", [](PajeTrace & self) { })
.def("__exit__", [](PajeTrace & self, py::args) { self.StopTracing(); })
.def("__del__", [](PajeTrace & self) { trace = nullptr; })
.def("__exit__", [](PajeTrace & self, py::args) { trace = nullptr; })
.def_static("SetTraceThreads", &PajeTrace::SetTraceThreads)
.def_static("SetTraceThreadCounter", &PajeTrace::SetTraceThreadCounter)
.def_static("SetMaxTracefileSize", &PajeTrace::SetMaxTracefileSize)