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

Commit5edcded

Browse files
committed
Fix Marshal PythonHome for PY3
1 parent403ae6f commit5edcded

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/runtime/pythonengine.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ public static string PythonHome
8585
{
8686
Marshal.FreeHGlobal(_pythonHome);
8787
}
88-
_pythonHome=Marshal.StringToHGlobalAnsi(value);
88+
_pythonHome=Runtime.IsPython3
89+
?UcsMarshaler.GetInstance("").MarshalManagedToNative(value)
90+
:Marshal.StringToHGlobalAnsi(value);
8991
Runtime.Py_SetPythonHome(_pythonHome);
9092
}
9193
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp