Skip to content

Commit 9ef71ec

Browse files
committed
Use interpreter id type for get_num_interpreters_seen()
1 parent b39c049 commit 9ef71ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/pybind11/detail/internals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ inline PyThreadState *get_thread_state_unchecked() {
420420

421421
/// We use this counter to figure out if there are or have been multiple subinterpreters active at
422422
/// any point. This must never decrease while any interpreter may be running in any thread!
423-
inline std::atomic<int> &get_num_interpreters_seen() {
424-
static std::atomic<int> counter(0);
423+
inline std::atomic<int64_t> &get_num_interpreters_seen() {
424+
static std::atomic<int64_t> counter(0);
425425
return counter;
426426
}
427427

0 commit comments

Comments
 (0)