Skip to content

Commit 691241a

Browse files
committed
Mark content created after assignment
1 parent dea5660 commit 691241a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/pybind11/detail/internals.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,6 @@ class internals_pp_manager {
738738
"pybind11::detail::internals_pp_manager::create_pp_content_once() "
739739
"FAILED: reentrant call detected while fetching pybind11 internals!");
740740
}
741-
// Each interpreter can only create its internals once.
742-
pps_have_created_content_.insert(pp);
743741
}
744742

745743
// Assume the GIL is held here. May call back into Python.
@@ -757,6 +755,9 @@ class internals_pp_manager {
757755
// Install the created content.
758756
pp->swap(tmp);
759757
}
758+
759+
// Each interpreter can only create its internals once.
760+
pps_have_created_content_.insert(pp);
760761
}
761762
}
762763

0 commit comments

Comments
 (0)