diff --git a/include/pybind11/internal/module.h b/include/pybind11/internal/module.h index 89751101..71a5d3b6 100644 --- a/include/pybind11/internal/module.h +++ b/include/pybind11/internal/module.h @@ -42,7 +42,7 @@ using module = module_; namespace pkbind::impl { \ auto _module_##name = [] { \ ::pkbind::action::register_start([] { \ - auto m = ::pkbind::module_(py_newmodule(#name), ::pkbind::object::ref_t{}); \ + auto m = ::pkbind::module_::create(#name); \ _pkbind_register_##name(m); \ }); \ return 1; \