File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,11 @@ mod _imp {
116
116
. ok_or_else ( || vm. new_import_error ( format ! ( "No such frozen object named {name}" ) , name) )
117
117
}
118
118
119
+ #[ pyfunction]
120
+ fn _override_frozen_modules_for_tests ( value : isize , vm : & VirtualMachine ) {
121
+ vm. state . override_frozen_modules . store ( value) ;
122
+ }
123
+
119
124
#[ pyfunction]
120
125
fn _fix_co_filename ( _code : PyObjectRef , _path : PyStrRef ) {
121
126
// TODO:
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ pub struct PyGlobalState {
96
96
pub codec_registry : CodecsRegistry ,
97
97
pub finalizing : AtomicBool ,
98
98
pub warnings : WarningsState ,
99
+ pub override_frozen_modules : AtomicCell < isize > ,
99
100
}
100
101
101
102
pub fn process_hash_secret_seed ( ) -> u32 {
@@ -172,6 +173,7 @@ impl VirtualMachine {
172
173
codec_registry,
173
174
finalizing : AtomicBool :: new ( false ) ,
174
175
warnings,
176
+ override_frozen_modules : AtomicCell :: new ( 0 ) ,
175
177
} ) ,
176
178
initialized : false ,
177
179
recursion_depth : Cell :: new ( 0 ) ,
You can’t perform that action at this time.
0 commit comments