@@ -155,9 +155,9 @@ public static void Initialize()
155
155
Initialize ( setSysArgv : true ) ;
156
156
}
157
157
158
- public static void Initialize ( bool setSysArgv = true , bool initSigs = false , ShutdownMode mode = ShutdownMode . Default )
158
+ public static void Initialize ( bool setSysArgv = true , bool initSigs = false , ShutdownMode mode = ShutdownMode . Default , bool fromPython = false )
159
159
{
160
- Initialize ( Enumerable . Empty < string > ( ) , setSysArgv : setSysArgv , initSigs : initSigs , mode ) ;
160
+ Initialize ( Enumerable . Empty < string > ( ) , setSysArgv : setSysArgv , initSigs : initSigs , mode , fromPython : fromPython ) ;
161
161
}
162
162
163
163
/// <summary>
@@ -170,7 +170,7 @@ public static void Initialize(bool setSysArgv = true, bool initSigs = false, Shu
170
170
/// interpreter lock (GIL) to call this method.
171
171
/// initSigs can be set to 1 to do default python signal configuration. This will override the way signals are handled by the application.
172
172
/// </remarks>
173
- public static void Initialize ( IEnumerable < string > args , bool setSysArgv = true , bool initSigs = false , ShutdownMode mode = ShutdownMode . Default )
173
+ public static void Initialize ( IEnumerable < string > args , bool setSysArgv = true , bool initSigs = false , ShutdownMode mode = ShutdownMode . Default , bool fromPython = false )
174
174
{
175
175
if ( initialized )
176
176
{
@@ -182,7 +182,7 @@ public static void Initialize(IEnumerable<string> args, bool setSysArgv = true,
182
182
// during an initial "import clr", and the world ends shortly thereafter.
183
183
// This is probably masking some bad mojo happening somewhere in Runtime.Initialize().
184
184
delegateManager = new DelegateManager ( ) ;
185
- Runtime . Initialize ( initSigs , mode ) ;
185
+ Runtime . Initialize ( initSigs , mode , fromPython ) ;
186
186
initialized = true ;
187
187
Exceptions . Clear ( ) ;
188
188
@@ -265,7 +265,7 @@ public static IntPtr InitExt()
265
265
{
266
266
try
267
267
{
268
- Initialize ( setSysArgv : false ) ;
268
+ Initialize ( setSysArgv : false , fromPython : true ) ;
269
269
270
270
// Trickery - when the import hook is installed into an already
271
271
// running Python, the standard import machinery is still in
0 commit comments