Skip to content

Commit

Permalink
Merge branch 'master' of github.com:emsec/hal
Browse files Browse the repository at this point in the history
  • Loading branch information
joern274 committed Jun 5, 2023
2 parents 591d2d1 + 1843c72 commit cb176c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/hal_core/netlist/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ namespace hal
* If `recursive` is `true`, gates in submodules are considered as well.
*
* @param[in] filter - Filter function to be evaluated on each gate.
* @param[in] recursive - Set to `true` to also consider gates in submodules, `false` otherwise.
* @param[in] recursive - Set to `true` to also consider gates in submodules, `false` otherwise. Defaults to `false`.
* @return A vector of gates.
*/
std::vector<Gate*> get_gates(const std::function<bool(Gate*)>& filter, bool recursive = false) const;
Expand Down
4 changes: 2 additions & 2 deletions src/python_bindings/bindings/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ namespace hal
:rtype: list[hal_py.Gate]
)");

py_module.def("get_gates", py::overload_cast<const std::function<bool(Gate*)>&, bool>(&Module::get_gates, py::const_), py::arg("filter"), py::arg("recursive") = false, R"(
py_module.def("get_gates", py::overload_cast<const std::function<bool(Gate*)>&, bool>(&Module::get_gates, py::const_), py::arg("filter") = nullptr, py::arg("recursive") = false, R"(
Get all gates contained within the module.
The filter is evaluated on every candidate such that the result only contains those matching the specified condition.
If ``recursive`` is ``True``, gates in submodules are considered as well.
:param lambda filter: Filter function to be evaluated on each gate.
:param bool recursive: ``True`` to also consider gates in submodules, ``False`` otherwise.
:param bool recursive: ``True`` to also consider gates in submodules, ``False`` otherwise. Defaults to ``False``.
:returns: A list of gates.
:rtype: list[hal_py.Gate]
)");
Expand Down

0 comments on commit cb176c3

Please sign in to comment.