Skip to content

Commit

Permalink
wip: do build apis
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoyner-tri committed Oct 17, 2024
1 parent 54f9829 commit 196cb5d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bindings/pydrake/systems/framework_py_semantics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,10 @@ void DoDefineFrameworkDiagramBuilder(py::module m) {
.def("ExportOutput", &DiagramBuilder<T>::ExportOutput, py::arg("output"),
py::arg("name") = kUseDefaultName, py_rvp::reference_internal,
doc.DiagramBuilder.ExportOutput.doc)
.def("Build", &DiagramBuilder<T>::Build,
// Keep alive, ownership (tr.): `self` keeps `return` alive.
py::keep_alive<1, 0>(), doc.DiagramBuilder.Build.doc)
.def("Build", &DiagramBuilder<T>::Build, internal::ref_cycle<1, 0>(),
doc.DiagramBuilder.Build.doc)
.def("BuildInto", &DiagramBuilder<T>::BuildInto, py::arg("target"),
// Keep alive, ownership (tr.): `target` keeps `self` alive.
py::keep_alive<2, 1>(), doc.DiagramBuilder.BuildInto.doc)
internal::ref_cycle<2, 1>(), doc.DiagramBuilder.BuildInto.doc)
.def("IsConnectedOrExported", &DiagramBuilder<T>::IsConnectedOrExported,
py::arg("port"), doc.DiagramBuilder.IsConnectedOrExported.doc)
.def("num_input_ports", &DiagramBuilder<T>::num_input_ports,
Expand Down

0 comments on commit 196cb5d

Please sign in to comment.