File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1263,11 +1263,14 @@ PYBIND11_NAMESPACE_END(detail)
1263
1263
// Use to activate Py_MOD_GIL_NOT_USED.
1264
1264
class mod_gil_not_used {
1265
1265
public:
1266
- explicit mod_gil_not_used (bool flag = true ) : flag_(flag ) {}
1266
+ mod_gil_not_used () : flag_(true ) {}
1267
1267
bool flag () const { return flag_; }
1268
1268
1269
+ friend mod_gil_not_used mod_gil_used ();
1270
+
1269
1271
private:
1270
1272
bool flag_;
1273
+ explicit mod_gil_not_used (bool flag) : flag_(flag) {}
1271
1274
};
1272
1275
1273
1276
inline mod_gil_not_used mod_gil_used () { return mod_gil_not_used (false ); }
@@ -1540,7 +1543,7 @@ class module_ : public object {
1540
1543
const char *doc,
1541
1544
PyModuleDef *def,
1542
1545
mod_gil_not_used gil_not_used
1543
- = mod_gil_not_used( false )) {
1546
+ = mod_gil_used( )) {
1544
1547
// Placement new (not an allocation).
1545
1548
new (def) PyModuleDef{/* m_base */ PyModuleDef_HEAD_INIT,
1546
1549
/* m_name */ name,
You can’t perform that action at this time.
0 commit comments