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

Commit39db9f4

Browse files
committed
Ensure that shutdown is called from Python
1 parent5e041af commit39db9f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎pythonnet/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def load():
3636
set_default_runtime()
3737

3838
dll_path=join(dirname(__file__),"runtime","Python.Runtime.dll")
39-
39+
4040
_LOADER_ASSEMBLY=_RUNTIME.get_assembly(dll_path)
4141

4242
func=_LOADER_ASSEMBLY["Python.Runtime.Loader.Initialize"]
43-
iffunc(''.encode("utf8"))!=0:
43+
iffunc(b"")!=0:
4444
raiseRuntimeError("Failed to initialize Python.Runtime.dll")
4545

4646
importatexit
@@ -51,7 +51,7 @@ def unload():
5151
global_RUNTIME
5252
if_LOADER_ASSEMBLYisnotNone:
5353
func=_LOADER_ASSEMBLY["Python.Runtime.Loader.Shutdown"]
54-
iffunc(b"")!=0:
54+
iffunc(b"full_shutdown")!=0:
5555
raiseRuntimeError("Failed to call Python.NET shutdown")
5656

5757
if_RUNTIMEisnotNone:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp