Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbae3bae

Browse files
committed
Make calling the shutdown code conditional for now
1 parenta5fd15a commitbae3bae

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/runtime/loader.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
usingSystem.Diagnostics;
12
usingSystem;
23
usingSystem.Runtime.InteropServices;
34
usingSystem.Text;
@@ -49,13 +50,18 @@ public unsafe static int Initialize(IntPtr data, int size)
4950
return0;
5051
}
5152

52-
publicstaticintShutdown(IntPtrdata,intsize)
53+
publicunsafestaticintShutdown(IntPtrdata,intsize)
5354
{
5455
IntPtrgs=IntPtr.Zero;
5556
try
5657
{
57-
gs=PyGILState_Ensure();
58-
PythonEngine.Shutdown();
58+
varcommand=Encoding.UTF8.GetString((byte*)data.ToPointer(),size);
59+
60+
if(command=="full_shutdown")
61+
{
62+
gs=PyGILState_Ensure();
63+
PythonEngine.Shutdown();
64+
}
5965
}
6066
catch(Exceptionexc)
6167
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp