Skip to content

Commit 331a60e

Browse files
committed
fix: remove the true/false parameter from mod_gil_not_used
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 7ade984 commit 331a60e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/pybind11/pybind11.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,11 +1263,14 @@ PYBIND11_NAMESPACE_END(detail)
12631263
// Use to activate Py_MOD_GIL_NOT_USED.
12641264
class mod_gil_not_used {
12651265
public:
1266-
explicit mod_gil_not_used(bool flag = true) : flag_(flag) {}
1266+
mod_gil_not_used() : flag_(true) {}
12671267
bool flag() const { return flag_; }
12681268

1269+
friend mod_gil_not_used mod_gil_used();
1270+
12691271
private:
12701272
bool flag_;
1273+
explicit mod_gil_not_used(bool flag) : flag_(flag) {}
12711274
};
12721275

12731276
inline mod_gil_not_used mod_gil_used() { return mod_gil_not_used(false); }

0 commit comments

Comments
 (0)