mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
refactor: module -> module_ with typedef (#2544)
* WIP: module -> module_ without typedef * refactor: allow py::module to work again
This commit is contained in:
@@ -18,7 +18,7 @@ TEST_SUBMODULE(async_module, m) {
|
||||
.def(py::init<>())
|
||||
.def("__await__", [](const SupportsAsync& self) -> py::object {
|
||||
static_cast<void>(self);
|
||||
py::object loop = py::module::import("asyncio.events").attr("get_event_loop")();
|
||||
py::object loop = py::module_::import("asyncio.events").attr("get_event_loop")();
|
||||
py::object f = loop.attr("create_future")();
|
||||
f.attr("set_result")(5);
|
||||
return f.attr("__await__")();
|
||||
|
||||
Reference in New Issue
Block a user