diff options
Diffstat (limited to '3rdparty/pybind11/tests/test_embed/external_module.cpp')
-rw-r--r-- | 3rdparty/pybind11/tests/test_embed/external_module.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/3rdparty/pybind11/tests/test_embed/external_module.cpp b/3rdparty/pybind11/tests/test_embed/external_module.cpp index e9a6058b..5c482fe0 100644 --- a/3rdparty/pybind11/tests/test_embed/external_module.cpp +++ b/3rdparty/pybind11/tests/test_embed/external_module.cpp @@ -9,15 +9,12 @@ namespace py = pybind11; PYBIND11_MODULE(external_module, m) { class A { public: - A(int value) : v{value} {}; + explicit A(int value) : v{value} {}; int v; }; - py::class_<A>(m, "A") - .def(py::init<int>()) - .def_readwrite("value", &A::v); + py::class_<A>(m, "A").def(py::init<int>()).def_readwrite("value", &A::v); - m.def("internals_at", []() { - return reinterpret_cast<uintptr_t>(&py::detail::get_internals()); - }); + m.def("internals_at", + []() { return reinterpret_cast<uintptr_t>(&py::detail::get_internals()); }); } |