Merge pull request #3494 from mejrs/slots

Update PyModuleDef_Slot types
This commit is contained in:
David Hewitt 2023-10-04 06:10:25 +00:00 committed by GitHub
commit a4b79dc1e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1 @@
Added the Py_mod_multiple_interpreters constant and its possible values.

View File

@ -85,6 +85,15 @@ impl Default for PyModuleDef_Slot {
pub const Py_mod_create: c_int = 1; pub const Py_mod_create: c_int = 1;
pub const Py_mod_exec: c_int = 2; pub const Py_mod_exec: c_int = 2;
#[cfg(Py_3_12)]
pub const Py_mod_multiple_interpreters: c_int = 3;
#[cfg(Py_3_12)]
pub const Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED: *mut c_void = 0 as *mut c_void;
#[cfg(Py_3_12)]
pub const Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED: *mut c_void = 1 as *mut c_void;
#[cfg(Py_3_12)]
pub const Py_MOD_PER_INTERPRETER_GIL_SUPPORTED: *mut c_void = 2 as *mut c_void;
// skipped non-limited _Py_mod_LAST_SLOT // skipped non-limited _Py_mod_LAST_SLOT