FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Drop reference to Py_Main by filmor · Pull Request #2504 · pythonnet/pythonnet · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 0 additions & 2 deletions src/runtime/Runtime.Delegates.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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));
Expand Down Expand Up @@ -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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL