diff options
author | gatecat <gatecat@ds0.me> | 2022-09-14 09:28:47 +0200 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-09-14 09:28:47 +0200 |
commit | a72f898ff4c4237424c468044a6db9d6953b541e (patch) | |
tree | 1c4a543f661dd1b281aecf4660388491702fa8d8 /3rdparty/pybind11/tests/test_cmake_build/embed.cpp | |
parent | f1349e114f3a16ccd002e8513339e18f5be4d31b (diff) | |
download | nextpnr-a72f898ff4c4237424c468044a6db9d6953b541e.tar.gz nextpnr-a72f898ff4c4237424c468044a6db9d6953b541e.tar.bz2 nextpnr-a72f898ff4c4237424c468044a6db9d6953b541e.zip |
3rdparty: Bump vendored pybind11 version for py3.11 support
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to '3rdparty/pybind11/tests/test_cmake_build/embed.cpp')
-rw-r--r-- | 3rdparty/pybind11/tests/test_cmake_build/embed.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/3rdparty/pybind11/tests/test_cmake_build/embed.cpp b/3rdparty/pybind11/tests/test_cmake_build/embed.cpp index a3abc8a8..30bc4f1e 100644 --- a/3rdparty/pybind11/tests/test_cmake_build/embed.cpp +++ b/3rdparty/pybind11/tests/test_cmake_build/embed.cpp @@ -6,15 +6,17 @@ PYBIND11_EMBEDDED_MODULE(test_cmake_build, m) { } int main(int argc, char *argv[]) { - if (argc != 2) + if (argc != 2) { throw std::runtime_error("Expected test.py file as the first argument"); - auto test_py_file = argv[1]; + } + auto *test_py_file = argv[1]; py::scoped_interpreter guard{}; auto m = py::module_::import("test_cmake_build"); - if (m.attr("add")(1, 2).cast<int>() != 3) + if (m.attr("add")(1, 2).cast<int>() != 3) { throw std::runtime_error("embed.cpp failed"); + } py::module_::import("sys").attr("argv") = py::make_tuple("test.py", "embed.cpp"); py::eval_file(test_py_file, py::globals()); |