Skip to content

Commit 464207b

Browse files
fix some things
1 parent 724a2aa commit 464207b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bindings/interface/MenuField.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace py = pybind11;
1414

1515
PYBIND11_MODULE(MenuField,m)
1616
{
17-
py::class_<BMenuField, BView>(m, "BMenuField")
17+
py::class_<BMenuField, BView, std::unique_ptr<BMenuField,py::nodelete>>(m, "BMenuField")
1818
.def(py::init<BRect, const char *, const char *, BMenu *, unsigned int, unsigned int>(), "", py::arg("frame"), py::arg("name"), py::arg("label"), py::arg("menu"), py::arg("resizingMode")=B_FOLLOW_LEFT_TOP, py::arg("flags")=B_WILL_DRAW | B_NAVIGABLE)
1919
.def(py::init<BRect, const char *, const char *, BMenu *, bool, unsigned int, unsigned int>(), "", py::arg("frame"), py::arg("name"), py::arg("label"), py::arg("menu"), py::arg("fixed_size"), py::arg("resizingMode")=B_FOLLOW_LEFT_TOP, py::arg("flags")=B_WILL_DRAW | B_NAVIGABLE)
2020
.def(py::init<const char *, const char *, BMenu *, unsigned int>(), "", py::arg("name"), py::arg("label"), py::arg("menu"), py::arg("flags")=B_WILL_DRAW | B_NAVIGABLE)

bindings/interface/PopUpMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace py = pybind11;
1212

1313
PYBIND11_MODULE(PopUpMenu,m)
1414
{
15-
py::class_<BPopUpMenu, BMenu>(m, "BPopUpMenu")
15+
py::class_<BPopUpMenu, BMenu, std::unique_ptr<BPopUpMenu,py::nodelete>>(m, "BPopUpMenu")
1616
.def(py::init<const char *, bool, bool, menu_layout>(), "", py::arg("name"), py::arg("radioMode")=true, py::arg("labelFromMarked")=true, py::arg("layout")=B_ITEMS_IN_COLUMN)
1717
.def(py::init<BMessage *>(), "", py::arg("data"))
1818
.def("Archive", &BPopUpMenu::Archive, "", py::arg("archive"), py::arg("deep")=true)

bindings/interface/Window.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ m.attr("B_MOVE_IF_PARTIALLY_OFFSCREEN") = 2;
105105

106106
//m.attr("PortLink") = PortLink;
107107

108-
py::class_<BWindow,PyBWindow>(m, "BWindow")
108+
py::class_<BWindow,PyBWindow,std::unique_ptr<BWindow,py::nodelete>>(m, "BWindow")
109109
.def(py::init<BRect, const char *, window_type, unsigned int, unsigned int>(), "", py::arg("frame"), py::arg("title"), py::arg("type"), py::arg("flags"), py::arg("workspace")=B_CURRENT_WORKSPACE)
110110
.def(py::init<BRect, const char *, window_look, window_feel, unsigned int, unsigned int>(), "", py::arg("frame"), py::arg("title"), py::arg("look"), py::arg("feel"), py::arg("flags"), py::arg("workspace")=B_CURRENT_WORKSPACE)
111111
.def(py::init<BMessage *>(), "", py::arg("archive"))

0 commit comments

Comments
 (0)