Skip to content

Commit c8025b1

Browse files
committed
Cleanup leak in test_modules by using new non-extension-module constructor
1 parent 2436f44 commit c8025b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_modules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ TEST_SUBMODULE(modules, m) {
6363
class DupeException { };
6464

6565
// Go ahead and leak, until we have a non-leaking py::module_ constructor
66-
auto dm = py::module_::create_extension_module("dummy", nullptr, new py::module_::module_def);
66+
auto dm = py::module_("dummy");
6767
auto failures = py::list();
6868

6969
py::class_<Dupe1>(dm, "Dupe1");

0 commit comments

Comments
 (0)