| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f2f5955 commit 21cb776
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -839,7 +839,11 @@ public static extern int Py_Main( | |||
| 839 | 839 | internal static extern int PyRun_SimpleString(string code); | |
| 840 | 840 | ||
| 841 | 841 | [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |
| 842 | + #if PYTHON2 | ||
| 842 | 843 | internal static extern NewReference PyRun_String(string code, IntPtr st, IntPtr globals, IntPtr locals); | |
| 844 | + #else | ||
| 845 | + internal static extern NewReference PyRun_String([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string code, IntPtr st, IntPtr globals, IntPtr locals); | ||
| 846 | + #endif | ||
| 843 | 847 | ||
| 844 | 848 | [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |
| 845 | 849 | internal static extern IntPtr PyEval_EvalCode(IntPtr co, IntPtr globals, IntPtr locals); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments