Skip to main content

pyo3_ffi/cpython/
pythread.rs

1use core::ffi::c_int;
2
3// skipped PY_TIMEOUT_MAX
4// skipped PYTHREAD_INVALID_THREAD_ID
5
6#[cfg(windows)]
7type NATIVE_TSS_KEY_T = core::ffi::c_ulong;
8
9#[cfg(not(windows))]
10type NATIVE_TSS_KEY_T = libc::pthread_key_t;
11
12#[repr(C)]
13pub struct Py_tss_t {
14    _is_initialized: c_int,
15    _key: NATIVE_TSS_KEY_T,
16}
17
18pub const Py_tss_NEEDS_INIT: Py_tss_t = Py_tss_t {
19    _is_initialized: 0,
20    _key: 0,
21};
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here