@@ -165,7 +165,7 @@ public class Runtime
165165#endif
166166
167167#if PYTHON_WITH_PYDEBUG
168- internal const string dllWithPyDebug = "d " ;
168+ internal const string dllWithPyDebug = "_d " ;
169169#else
170170 internal const string dllWithPyDebug = "" ;
171171#endif
@@ -356,6 +356,8 @@ internal static void Shutdown()
356356 AssemblyManager . Shutdown ( ) ;
357357 Exceptions . Shutdown ( ) ;
358358 ImportHook . Shutdown ( ) ;
359+ TypeManager . Shutdown ( ) ;
360+ ClassManager . Shutdown ( ) ;
359361 Py_Finalize ( ) ;
360362 }
361363
@@ -638,6 +640,9 @@ internal static unsafe long Refcount(IntPtr op)
638640 [ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
639641 internal static extern IntPtr PyThreadState_Swap( IntPtr key ) ;
640642
643+ [ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
644+ internal static extern long PyGC_Collect( ) ;
645+
641646 [ DllImport ( _PythonDll , CallingConvention = CallingConvention . Cdecl ) ]
642647 internal static extern IntPtr PyGILState_Ensure( ) ;
643648
@@ -1497,15 +1502,11 @@ internal static bool PyIter_Check(IntPtr pointer)
14971502 internal static extern string PyModule_GetFilename( IntPtr module) ;
14981503
14991504#if PYTHON3
1500-
1501- #if PYTHON_WITH_PYDEBUG
1502- [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl,
1503- EntryPoint = "PyModule_Create2TraceRefs") ]
1504- internal static extern IntPtr PyModule_Create2( IntPtr module, int apiver) ;
1505- #else
15061505 [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
15071506 internal static extern IntPtr PyModule_Create2( IntPtr module, int apiver) ;
1508- #endif
1507+
1508+ [ DllImport( _PythonDll, CallingConvention = CallingConvention. Cdecl) ]
1509+ internal static extern IntPtr PyModule_Create2TraceRefs( IntPtr module, int apiver) ;
15091510
15101511#endif
15111512
0 commit comments