aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/pybind11/tests/pybind11_tests.cpp
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2021-01-02 10:15:39 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2021-01-02 10:15:39 +0100
commite76cdab6dd77bad411e6ac9372ee527aff89ef17 (patch)
treee9868f05cf455336d75f33b1312d71034f8fb334 /3rdparty/pybind11/tests/pybind11_tests.cpp
parentc6cdf30501dcb2da01361229dd66a05dad73a132 (diff)
downloadnextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.tar.gz
nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.tar.bz2
nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.zip
Update pybind11 to version 2.6.1
Diffstat (limited to '3rdparty/pybind11/tests/pybind11_tests.cpp')
-rw-r--r--3rdparty/pybind11/tests/pybind11_tests.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/3rdparty/pybind11/tests/pybind11_tests.cpp b/3rdparty/pybind11/tests/pybind11_tests.cpp
index bc7d2c3e..439cd401 100644
--- a/3rdparty/pybind11/tests/pybind11_tests.cpp
+++ b/3rdparty/pybind11/tests/pybind11_tests.cpp
@@ -26,23 +26,23 @@ productively.
Instead, see the "How can I reduce the build time?" question in the "Frequently asked questions"
section of the documentation for good practice on splitting binding code over multiple files.
*/
-std::list<std::function<void(py::module &)>> &initializers() {
- static std::list<std::function<void(py::module &)>> inits;
+std::list<std::function<void(py::module_ &)>> &initializers() {
+ static std::list<std::function<void(py::module_ &)>> inits;
return inits;
}
test_initializer::test_initializer(Initializer init) {
- initializers().push_back(init);
+ initializers().emplace_back(init);
}
test_initializer::test_initializer(const char *submodule_name, Initializer init) {
- initializers().push_back([=](py::module &parent) {
+ initializers().emplace_back([=](py::module_ &parent) {
auto m = parent.def_submodule(submodule_name);
init(m);
});
}
-void bind_ConstructorStats(py::module &m) {
+void bind_ConstructorStats(py::module_ &m) {
py::class_<ConstructorStats>(m, "ConstructorStats")
.def("alive", &ConstructorStats::alive)
.def("values", &ConstructorStats::values)
@@ -88,6 +88,4 @@ PYBIND11_MODULE(pybind11_tests, m) {
for (const auto &initializer : initializers())
initializer(m);
-
- if (!py::hasattr(m, "have_eigen")) m.attr("have_eigen") = false;
}