Skip to content

Commit

Permalink
Merge pull request #3494 from mejrs/slots
Browse files Browse the repository at this point in the history
Update PyModuleDef_Slot types
  • Loading branch information
davidhewitt authored Oct 4, 2023
2 parents 90cc69b + aa011f4 commit a4b79dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/3494.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added the Py_mod_multiple_interpreters constant and its possible values.
9 changes: 9 additions & 0 deletions pyo3-ffi/src/moduleobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ impl Default for PyModuleDef_Slot {

pub const Py_mod_create: c_int = 1;
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

Expand Down

0 comments on commit a4b79dc

Please sign in to comment.