@@ -157,15 +157,8 @@ internal static void Initialize(bool initSigs = false)
157157 // Initialize modules that depend on the runtime class.
158158 AssemblyManager . Initialize ( ) ;
159159 OperatorMethod . Initialize ( ) ;
160- if ( RuntimeData . HasStashData ( ) )
161- {
162- RuntimeData . RestoreRuntimeData ( ) ;
163- }
164- else
165- {
166- PyCLRMetaType = MetaType . Initialize ( ) ;
167- ImportHook . Initialize ( ) ;
168- }
160+ PyCLRMetaType = MetaType . Initialize ( ) ;
161+ ImportHook . Initialize ( ) ;
169162 Exceptions . Initialize ( ) ;
170163
171164 // Need to add the runtime directory to sys.path so that we
@@ -269,8 +262,6 @@ internal static void Shutdown()
269262 {
270263 // avoid saving dead objects
271264 TryCollectingGarbage ( runs : 3 ) ;
272-
273- RuntimeData . Stash ( ) ;
274265 }
275266
276267 AssemblyManager . Shutdown ( ) ;
@@ -832,7 +823,7 @@ public static int Py_Main(int argc, string[] argv)
832823
833824 internal static IntPtr Py_GetBuildInfo ( ) => Delegates . Py_GetBuildInfo ( ) ;
834825
835- const PyCompilerFlags Utf8String = PyCompilerFlags . IGNORE_COOKIE | PyCompilerFlags . SOURCE_IS_UTF8 ;
826+ private static readonly PyCompilerFlags Utf8String = PyCompilerFlags . IGNORE_COOKIE | PyCompilerFlags . SOURCE_IS_UTF8 ;
836827
837828 internal static int PyRun_SimpleString ( string code )
838829 {
@@ -1715,7 +1706,7 @@ internal static bool PyType_IsSameAsOrSubtype(BorrowedReference type, BorrowedRe
17151706 internal static NewReference PyType_GenericAlloc ( BorrowedReference type , nint n ) => Delegates . PyType_GenericAlloc ( type , n ) ;
17161707
17171708 internal static IntPtr PyType_GetSlot ( BorrowedReference type , TypeSlotID slot ) => Delegates . PyType_GetSlot ( type , slot ) ;
1718- internal static NewReference PyType_FromSpecWithBases ( in NativeTypeSpec spec , BorrowedReference bases ) => Delegates . PyType_FromSpecWithBases ( in spec , bases ) ;
1709+ internal static NewReference PyType_FromSpecWithBases ( scoped in NativeTypeSpec spec , BorrowedReference bases ) => Delegates . PyType_FromSpecWithBases ( in spec , bases ) ;
17191710
17201711 /// <summary>
17211712 /// Finalize a type object. This should be called on all type objects to finish their initialization. This function is responsible for adding inherited slots from a type�s base class. Return 0 on success, or return -1 and sets an exception on error.
0 commit comments