refactor: module -> module_ with typedef (#2544)

* WIP: module -> module_ without typedef

* refactor: allow py::module to work again
This commit is contained in:
Henry Schreiner
2020-10-03 13:38:03 -04:00
committed by GitHub
parent 560ed3e34f
commit 6bcd220c8d
40 changed files with 132 additions and 127 deletions

View File

@@ -12,10 +12,10 @@ int main(int argc, char *argv[]) {
py::scoped_interpreter guard{};
auto m = py::module::import("test_cmake_build");
auto m = py::module_::import("test_cmake_build");
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::module_::import("sys").attr("argv") = py::make_tuple("test.py", "embed.cpp");
py::eval_file(test_py_file, py::globals());
}