Vendor deps.
This commit is contained in:
1 parent
294527085e
commit
91e18fde3a
1714 files changed
+556667
-7
No files matched your search
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
#[cfg(Py_3_14)]
|
||||
use core::ffi::c_int;
|
||||
use core::sync::atomic::AtomicU8;
|
||||
|
||||
#[repr(transparent)]
|
||||
#[derive(Debug)]
|
||||
pub struct PyMutex {
|
||||
pub(crate) _bits: AtomicU8,
|
||||
}
|
||||
|
||||
// we don't impl Default because PyO3's safe wrappers don't need it
|
||||
#[allow(clippy::new_without_default)]
|
||||
impl PyMutex {
|
||||
pub const fn new() -> PyMutex {
|
||||
PyMutex {
|
||||
_bits: AtomicU8::new(0),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern_libpython! {
|
||||
pub fn PyMutex_Lock(m: *mut PyMutex);
|
||||
pub fn PyMutex_Unlock(m: *mut PyMutex);
|
||||
#[cfg(Py_3_14)]
|
||||
pub fn PyMutex_IsLocked(m: *mut PyMutex) -> c_int;
|
||||
}
|
||||
Reference in new issue
Block a user