Skip to content

Commit e48ca28

Browse files
MegasKomnenosyouknowone
authored andcommitted
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.
1 parent 7b0ab17 commit e48ca28

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

vm/src/stdlib/sys.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ mod sys {
728728
hash_randomization: settings.hash_seed.is_none() as u8,
729729
isolated: settings.isolated as u8,
730730
dev_mode: settings.dev_mode,
731-
utf8_mode: 1,
731+
utf8_mode: settings.utf8_mode,
732732
int_max_str_digits: -1,
733733
safe_path: false,
734734
warn_default_encoding: settings.warn_default_encoding as u8,

vm/src/vm/setting.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ pub struct Settings {
7474
/// false for wasm. Not a command-line option
7575
pub allow_external_library: bool,
7676

77+
pub utf8_mode: u8,
78+
7779
#[cfg(feature = "flame-it")]
7880
pub profile_output: Option<OsString>,
7981
#[cfg(feature = "flame-it")]
@@ -107,6 +109,7 @@ impl Default for Settings {
107109
stdio_unbuffered: false,
108110
check_hash_based_pycs: "default".to_owned(),
109111
allow_external_library: cfg!(feature = "importlib"),
112+
utf8_mode: 1,
110113
#[cfg(feature = "flame-it")]
111114
profile_output: None,
112115
#[cfg(feature = "flame-it")]

0 commit comments

Comments
 (0)