Add utf8_mode field to Settings and make Flags to reference it for init

I also changed the type from u8 to bool. No difference functionality-wise.
This commit is contained in:
MegasKomnenos
2023-03-26 14:12:02 +09:00
committed by Jeong YunWon
parent 7b0ab173dd
commit e48ca2892b
2 changed files with 4 additions and 1 deletions

View File

@@ -728,7 +728,7 @@ mod sys {
hash_randomization: settings.hash_seed.is_none() as u8,
isolated: settings.isolated as u8,
dev_mode: settings.dev_mode,
utf8_mode: 1,
utf8_mode: settings.utf8_mode,
int_max_str_digits: -1,
safe_path: false,
warn_default_encoding: settings.warn_default_encoding as u8,

View File

@@ -74,6 +74,8 @@ pub struct Settings {
/// false for wasm. Not a command-line option
pub allow_external_library: bool,
pub utf8_mode: u8,
#[cfg(feature = "flame-it")]
pub profile_output: Option<OsString>,
#[cfg(feature = "flame-it")]
@@ -107,6 +109,7 @@ impl Default for Settings {
stdio_unbuffered: false,
check_hash_based_pycs: "default".to_owned(),
allow_external_library: cfg!(feature = "importlib"),
utf8_mode: 1,
#[cfg(feature = "flame-it")]
profile_output: None,
#[cfg(feature = "flame-it")]