Skip to content

Commit e89d827

Browse files
committed
Cleanup
1 parent e011262 commit e89d827

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

bindings/Sofa/src/SofaPython3/Sofa/Helper/Binding_MessageHandler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,11 @@ namespace sofapython3
122122
f.def("process", &PyMessageHandler::process);
123123
f.def("__enter__", [](PyMessageHandler* self) -> PyMessageHandler*
124124
{
125-
PythonEnvironment::gil acquire {"MessageHandler"};
126125
sofa::helper::logging::MessageDispatcher::addHandler(self);
127126
return self;
128127
});
129128
f.def("__exit__", [](PyMessageHandler* self, py::object /*exc_type*/, py::object /*exc_value*/, py::object /*traceback*/)
130129
{
131-
PythonEnvironment::gil acquire {"MessageHandler"};
132130
sofa::helper::logging::MessageDispatcher::rmHandler(self);
133131
});
134132
}

bindings/Sofa/src/SofaPython3/Sofa/Simulation/Submodule_Simulation.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ using namespace pybind11::literals;
4040
using sofa::simulation::Simulation;
4141

4242
#include <sofa/core/visual/VisualParams.h>
43-
#include <sofa/helper/logging/MessageDispatcher.h>
44-
#include <sofa/helper/logging/ConsoleMessageHandler.h>
45-
#include <sofa/core/logging/PerComponentLoggingMessageHandler.h>
46-
using sofa::helper::logging::MessageDispatcher;
47-
using sofa::helper::logging::MainPerComponentLoggingMessageHandler;
4843
#include "Submodule_Simulation_doc.h"
4944

5045
namespace py = pybind11;
@@ -61,7 +56,7 @@ PYBIND11_MODULE(Simulation, simulation)
6156

6257
simulation.def("print", [](Node* n){ sofa::simulation::getSimulation()->print(n); }, sofapython3::doc::simulation::print);
6358
simulation.def("animate", [](Node* n, SReal dt=0.0){ sofa::simulation::getSimulation()->animate(n, dt); },sofapython3::doc::simulation::animate);
64-
simulation.def("init", [](Node* n) { sofa::simulation::getSimulation()->init(n); }, sofapython3::doc::simulation::init);
59+
simulation.def("init", [](Node* n){ sofa::simulation::getSimulation()->init(n); }, sofapython3::doc::simulation::init);
6560
simulation.def("initVisual", [](Node* n){ n->getVisualLoop()->initStep(sofa::core::visual::VisualParams::defaultInstance()); });
6661
simulation.def("reset", [](Node* n){ sofa::simulation::getSimulation()->reset(n); }, sofapython3::doc::simulation::reset);
6762
simulation.def("load", [](const std::string & name) {

0 commit comments

Comments
 (0)