Searched refs:MyObject1 (Results 1 – 2 of 2) sorted by relevance
/external/python/pybind11/tests/ |
D | test_smart_ptr.cpp | 98 class MyObject1 : public Object { in TEST_SUBMODULE() class 100 MyObject1(int value) : value(value) { print_created(this, toString()); } in TEST_SUBMODULE() function in TEST_SUBMODULE::MyObject1 103 ~MyObject1() override { print_destroyed(this); } in TEST_SUBMODULE() 107 py::class_<MyObject1, ref<MyObject1>>(m, "MyObject1", obj) in TEST_SUBMODULE() 109 py::implicitly_convertible<py::int_, MyObject1>(); in TEST_SUBMODULE() 111 m.def("make_object_1", []() -> Object * { return new MyObject1(1); }); in TEST_SUBMODULE() 112 m.def("make_object_2", []() -> ref<Object> { return new MyObject1(2); }); in TEST_SUBMODULE() 113 m.def("make_myobject1_1", []() -> MyObject1 * { return new MyObject1(4); }); in TEST_SUBMODULE() 114 m.def("make_myobject1_2", []() -> ref<MyObject1> { return new MyObject1(5); }); in TEST_SUBMODULE() 119 m.def("print_myobject1_1", [](const MyObject1 *obj) { py::print(obj->toString()); }); in TEST_SUBMODULE() [all …]
|
D | test_smart_ptr.py | 11 [m.make_object_1(), m.make_object_2(), m.MyObject1(3)], start=1 22 [m.make_myobject1_1(), m.make_myobject1_2(), m.MyObject1(6), 7], start=4 39 cstats = ConstructorStats.get(m.MyObject1)
|