File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,11 @@ mod _imp {
116116 . ok_or_else ( || vm. new_import_error ( format ! ( "No such frozen object named {name}" ) , name) )
117117 }
118118
119+ #[ pyfunction]
120+ fn _override_frozen_modules_for_tests ( value : isize , vm : & VirtualMachine ) {
121+ vm. state . override_frozen_modules . store ( value) ;
122+ }
123+
119124 #[ pyfunction]
120125 fn _fix_co_filename ( _code : PyObjectRef , _path : PyStrRef ) {
121126 // TODO:
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ pub struct PyGlobalState {
9696 pub codec_registry : CodecsRegistry ,
9797 pub finalizing : AtomicBool ,
9898 pub warnings : WarningsState ,
99+ pub override_frozen_modules : AtomicCell < isize > ,
99100}
100101
101102pub fn process_hash_secret_seed ( ) -> u32 {
@@ -172,6 +173,7 @@ impl VirtualMachine {
172173 codec_registry,
173174 finalizing : AtomicBool :: new ( false ) ,
174175 warnings,
176+ override_frozen_modules : AtomicCell :: new ( 0 ) ,
175177 } ) ,
176178 initialized : false ,
177179 recursion_depth : Cell :: new ( 0 ) ,
You can’t perform that action at this time.
0 commit comments