mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
bugfix: delete proper ctors in gil.h (#4490)
This commit is contained in:
parent
3efe9d4cb5
commit
08a89fac3a
@ -152,8 +152,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gil_scoped_release(const gil_scoped_acquire &) = delete;
|
gil_scoped_release(const gil_scoped_release &) = delete;
|
||||||
gil_scoped_release &operator=(const gil_scoped_acquire &) = delete;
|
gil_scoped_release &operator=(const gil_scoped_release &) = delete;
|
||||||
|
|
||||||
/// This method will disable the PyThreadState_DeleteCurrent call and the
|
/// This method will disable the PyThreadState_DeleteCurrent call and the
|
||||||
/// GIL won't be acquired. This method should be used if the interpreter
|
/// GIL won't be acquired. This method should be used if the interpreter
|
||||||
@ -203,7 +203,7 @@ class gil_scoped_release {
|
|||||||
public:
|
public:
|
||||||
gil_scoped_release() : state{PyEval_SaveThread()} {}
|
gil_scoped_release() : state{PyEval_SaveThread()} {}
|
||||||
gil_scoped_release(const gil_scoped_release &) = delete;
|
gil_scoped_release(const gil_scoped_release &) = delete;
|
||||||
gil_scoped_release &operator=(const gil_scoped_acquire &) = delete;
|
gil_scoped_release &operator=(const gil_scoped_release &) = delete;
|
||||||
~gil_scoped_release() { PyEval_RestoreThread(state); }
|
~gil_scoped_release() { PyEval_RestoreThread(state); }
|
||||||
void disarm() {}
|
void disarm() {}
|
||||||
};
|
};
|
||||||
@ -230,7 +230,7 @@ public:
|
|||||||
(void) (this != (this + 1));
|
(void) (this != (this + 1));
|
||||||
}
|
}
|
||||||
gil_scoped_release(const gil_scoped_release &) = delete;
|
gil_scoped_release(const gil_scoped_release &) = delete;
|
||||||
gil_scoped_release &operator=(const gil_scoped_acquire &) = delete;
|
gil_scoped_release &operator=(const gil_scoped_release &) = delete;
|
||||||
void disarm() {}
|
void disarm() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user