diff options
author | myrtle <gatecat@ds0.me> | 2022-09-15 09:06:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 09:06:35 +0200 |
commit | 3983d4fe53e2c609a5c76510aff8e998a4c22285 (patch) | |
tree | 1c4a543f661dd1b281aecf4660388491702fa8d8 /3rdparty/pybind11/tests/test_embed/external_module.cpp | |
parent | f1349e114f3a16ccd002e8513339e18f5be4d31b (diff) | |
parent | a72f898ff4c4237424c468044a6db9d6953b541e (diff) | |
download | nextpnr-3983d4fe53e2c609a5c76510aff8e998a4c22285.tar.gz nextpnr-3983d4fe53e2c609a5c76510aff8e998a4c22285.tar.bz2 nextpnr-3983d4fe53e2c609a5c76510aff8e998a4c22285.zip |
Merge pull request #1024 from YosysHQ/gatecat/pybind11-bump
3rdparty: Bump vendored pybind11 version for py3.11 support
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()); }); } |