ffi: add new 3.11 fields to PyConfig

These are the new fields in 3.11 so far. 3.11 is supposedly feature
frozen, so hopefully we don't need to revisit this struct before 3.11
final.
This commit is contained in:
Gregory Szorc 2022-05-13 17:52:31 -07:00
parent 03cb561d41
commit f1c477b536

View file

@ -92,10 +92,14 @@ pub struct PyConfig {
pub _use_peg_parser: c_int,
pub tracemalloc: c_int,
pub import_time: c_int,
#[cfg(Py_3_11)]
pub code_debug_ranges: c_int,
pub show_ref_count: c_int,
#[cfg(not(Py_3_9))]
pub show_alloc_count: c_int,
pub dump_refs: c_int,
#[cfg(Py_3_11)]
pub dump_refs_file: *mut wchar_t,
pub malloc_stats: c_int,
pub filesystem_encoding: *mut wchar_t,
pub filesystem_errors: *mut wchar_t,
@ -129,6 +133,10 @@ pub struct PyConfig {
pub legacy_windows_stdio: c_int,
pub check_hash_pycs_mode: *mut wchar_t,
#[cfg(Py_3_11)]
pub use_frozen_modules: c_int,
#[cfg(Py_3_11)]
pub safe_path: c_int,
pub pathconfig_warnings: c_int,
#[cfg(Py_3_10)]
pub program_name: *mut wchar_t,
@ -139,6 +147,8 @@ pub struct PyConfig {
pub module_search_paths_set: c_int,
pub module_search_paths: PyWideStringList,
#[cfg(Py_3_11)]
pub stdlib_dir: *mut wchar_t,
pub executable: *mut wchar_t,
pub base_executable: *mut wchar_t,
pub prefix: *mut wchar_t,
@ -155,6 +165,8 @@ pub struct PyConfig {
pub _init_main: c_int,
#[cfg(Py_3_9)]
pub _isolated_interpreter: c_int,
#[cfg(Py_3_11)]
pub _is_python_build: c_int,
#[cfg(all(Py_3_9, not(Py_3_10)))]
pub orig_argv: PyWideStringList,
}