@@ -27,8 +27,7 @@ class Py_SyncActionNode : public SyncActionNode
27
27
28
28
NodeStatus tick () override
29
29
{
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);
32
31
}
33
32
};
34
33
@@ -41,20 +40,18 @@ class Py_StatefulActionNode final : public StatefulActionNode
41
40
42
41
NodeStatus onStart () override
43
42
{
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);
46
44
}
47
45
48
46
NodeStatus onRunning () override
49
47
{
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 );
52
50
}
53
51
54
52
void onHalted () override
55
53
{
56
- py::gil_scoped_acquire gil;
57
- py::get_overload (this , " on_halted" )();
54
+ PYBIND11_OVERRIDE_PURE_NAME (void , Py_StatefulActionNode, " on_running" , onRunning);
58
55
}
59
56
};
60
57
0 commit comments