8000 Fix the PyGILState_STATE type · pythonnet/pythonnet@216c705 · GitHub
[go: up one dir, main page]

Skip to content

Commit 216c705

Browse files
filmorlostmsu
authored andcommitted
Fix the PyGILState_STATE type
CPython uses a bare `enum` here, both of .NET and C default to `int` enums, so this should be closer to the truth if no special compile options are used.
1 parent 806f79e commit 216c705

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/runtime/native/PyGILState.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using System;
2-
using System.Runtime.InteropServices;
3-
41
namespace Python.Runtime.Native;
52

63
/// <remarks><c>PyGILState_STATE</c></remarks>
7-
[StructLayout(LayoutKind.Sequential)]
8-
struct PyGILState
4+
enum PyGILState
95
{
10-
IntPtr handle;
6+
PyGILState_LOCKED,
7+
PyGILState_UNLOCKED
118
}

0 commit comments

Comments
 (0)
0