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

added missing PyThreadState_Swap to Runtime and its Delegates#1673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionssrc/runtime/Runtime.Delegates.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,7 @@ static Delegates()
Py_EndInterpreter = (delegate* unmanaged[Cdecl]<PyThreadState*, void>)GetFunctionByName(nameof(Py_EndInterpreter), GetUnmanagedDll(_PythonDll));
PyThreadState_New = (delegate* unmanaged[Cdecl]<PyInterpreterState*, PyThreadState*>)GetFunctionByName(nameof(PyThreadState_New), GetUnmanagedDll(_PythonDll));
PyThreadState_Get = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(PyThreadState_Get), GetUnmanagedDll(_PythonDll));
PyThreadState_Swap = (delegate* unmanaged[Cdecl]<PyThreadState*, PyThreadState*>)GetFunctionByName(nameof(PyThreadState_Swap), GetUnmanagedDll(_PythonDll));
_PyThreadState_UncheckedGet = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(_PyThreadState_UncheckedGet), GetUnmanagedDll(_PythonDll));
try
{
Expand DownExpand Up@@ -313,6 +314,7 @@ static Delegates()
internal static delegate* unmanaged[Cdecl]<PyThreadState*, void> Py_EndInterpreter { get; }
internal static delegate* unmanaged[Cdecl]<PyInterpreterState*, PyThreadState*> PyThreadState_New { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> PyThreadState_Get { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*, PyThreadState*> PyThreadState_Swap { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> _PyThreadState_UncheckedGet { get; }
internal static delegate* unmanaged[Cdecl]<int> PyGILState_Check { get; }
internal static delegate* unmanaged[Cdecl]<PyGILState> PyGILState_Ensure { get; }
Expand Down
3 changes: 3 additions & 0 deletionssrc/runtime/Runtime.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -748,6 +748,9 @@ internal static T TryUsingDll<T>(Func<T> op)


internal static PyThreadState* PyThreadState_Get() => Delegates.PyThreadState_Get();


internal static PyThreadState* PyThreadState_Swap(PyThreadState* threadState) => Delegates.PyThreadState_Swap(threadState);


internal static PyThreadState* _PyThreadState_UncheckedGet() => Delegates._PyThreadState_UncheckedGet();
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp