Skip to content

Commit

Permalink
ffi: update PyConfig for Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Mar 6, 2021
1 parent 9ef330d commit 7ed53b7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ffi/cpython/initconfig.rs
Expand Up @@ -99,7 +99,10 @@ pub struct PyConfig {
pub filesystem_errors: *mut wchar_t,
pub pycache_prefix: *mut wchar_t,
pub parse_argv: c_int,
#[cfg(Py_3_10)]
pub orig_argv: PyWideStringList,
pub argv: PyWideStringList,
#[cfg(not(Py_3_10))]
pub program_name: *mut wchar_t,
pub xoptions: PyWideStringList,
pub warnoptions: PyWideStringList,
Expand All @@ -122,9 +125,14 @@ pub struct PyConfig {
pub legacy_windows_stdio: c_int,

pub check_hash_pycs_mode: *mut wchar_t,
#[cfg(Py_3_10)]
pub program_name: *mut wchar_t,
pub pathconfig_warnings: c_int,
pub pythonpath_env: *mut wchar_t,
pub home: *mut wchar_t,
#[cfg(Py_3_10)]
pub platlibdir: *mut wchar_t,

pub module_search_paths_set: c_int,
pub module_search_paths: PyWideStringList,
pub executable: *mut wchar_t,
Expand All @@ -133,7 +141,7 @@ pub struct PyConfig {
pub base_prefix: *mut wchar_t,
pub exec_prefix: *mut wchar_t,
pub base_exec_prefix: *mut wchar_t,
#[cfg(Py_3_9)]
#[cfg(all(Py_3_9, not(Py_3_10)))]
pub platlibdir: *mut wchar_t,
pub skip_source_first_line: c_int,
pub run_command: *mut wchar_t,
Expand All @@ -143,7 +151,7 @@ pub struct PyConfig {
pub _init_main: c_int,
#[cfg(Py_3_9)]
pub _isolated_interpreter: c_int,
#[cfg(Py_3_9)]
#[cfg(all(Py_3_9, not(Py_3_10)))]
pub orig_argv: PyWideStringList,
}

Expand Down

0 comments on commit 7ed53b7

Please sign in to comment.