◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
2 changes: 0 additions & 2 deletions src/runtime/Runtime.Delegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ static Delegates()
PyGILState_Ensure = (delegate* unmanaged[Cdecl]<PyGILState>)GetFunctionByName(nameof(PyGILState_Ensure), GetUnmanagedDll(_PythonDll));
PyGILState_Release = (delegate* unmanaged[Cdecl]<PyGILState, void>)GetFunctionByName(nameof(PyGILState_Release), GetUnmanagedDll(_PythonDll));
PyGILState_GetThisThreadState = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(PyGILState_GetThisThreadState), GetUnmanagedDll(_PythonDll));
Py_Main = (delegate* unmanaged[Cdecl]<int, IntPtr, int>)GetFunctionByName(nameof(Py_Main), GetUnmanagedDll(_PythonDll));
PyEval_InitThreads = (delegate* unmanaged[Cdecl]<void>)GetFunctionByName(nameof(PyEval_InitThreads), GetUnmanagedDll(_PythonDll));
PyEval_ThreadsInitialized = (delegate* unmanaged[Cdecl]<int>)GetFunctionByName(nameof(PyEval_ThreadsInitialized), GetUnmanagedDll(_PythonDll));
PyEval_AcquireLock = (delegate* unmanaged[Cdecl]<void>)GetFunctionByName(nameof(PyEval_AcquireLock), GetUnmanagedDll(_PythonDll));
@@ -319,7 +318,6 @@ static Delegates()
internal static delegate* unmanaged[Cdecl]<PyGILState> PyGILState_Ensure { get; }
internal static delegate* unmanaged[Cdecl]<PyGILState, void> PyGILState_Release { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> PyGILState_GetThisThreadState { get; }
internal static delegate* unmanaged[Cdecl]<int, IntPtr, int> Py_Main { get; }
internal static delegate* unmanaged[Cdecl]<void> PyEval_InitThreads { get; }
internal static delegate* unmanaged[Cdecl]<int> PyEval_ThreadsInitialized { get; }
internal static delegate* unmanaged[Cdecl]<void> PyEval_AcquireLock { get; }
Expand Down
14 changes: 0 additions & 14 deletions src/runtime/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -719,20 +719,6 @@ internal static T TryUsingDll<T>(Func<T> op)
internal static PyThreadState* PyGILState_GetThisThreadState() => Delegates.PyGILState_GetThisThreadState();


public static int Py_Main(int argc, string[] argv)
{
var marshaler = StrArrayMarshaler.GetInstance(null);
var argvPtr = marshaler.MarshalManagedToNative(argv);
try
{
return Delegates.Py_Main(argc, argvPtr);
}
finally
{
marshaler.CleanUpNativeData(argvPtr);
}
}

internal static void PyEval_InitThreads() => Delegates.PyEval_InitThreads();


Expand Down
Toggle all file notes Toggle all file annotations