@@ -27,8 +27,7 @@ class Py_SyncActionNode : public SyncActionNode
2727
2828 NodeStatus tick () override
2929 {
30- py::gil_scoped_acquire gil;
31- return py::get_overload (this , " tick" )().cast <NodeStatus>();
30+ PYBIND11_OVERRIDE_PURE_NAME (NodeStatus, Py_SyncActionNode, " tick" , tick);
3231 }
3332};
3433
@@ -41,20 +40,18 @@ class Py_StatefulActionNode final : public StatefulActionNode
4140
4241 NodeStatus onStart () override
4342 {
44- py::gil_scoped_acquire gil;
45- return py::get_overload (this , " on_start" )().cast <NodeStatus>();
43+ PYBIND11_OVERRIDE_PURE_NAME (NodeStatus, Py_StatefulActionNode, " on_start" , onStart);
4644 }
4745
4846 NodeStatus onRunning () override
4947 {
50- py::gil_scoped_acquire gil;
51- return py::get_overload ( this , " on_running " )(). cast <NodeStatus>( );
48+ PYBIND11_OVERRIDE_PURE_NAME (NodeStatus, Py_StatefulActionNode, " on_running " ,
49+ onRunning );
5250 }
5351
5452 void onHalted () override
5553 {
56- py::gil_scoped_acquire gil;
57- py::get_overload (this , " on_halted" )();
54+ PYBIND11_OVERRIDE_PURE_NAME (void , Py_StatefulActionNode, " on_running" , onRunning);
5855 }
5956};
6057
0 commit comments