Skip to content

Commit fe31fcf

Browse files
committed
cloudy with a chance of segfaults
1 parent b3042ec commit fe31fcf

File tree

10 files changed

+1818
-969
lines changed

10 files changed

+1818
-969
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: [ubuntu-latest, windows-latest, macos-latest]
28-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
28+
python-version: ["3.7", "3.8", "3.9", "3.10"]
2929

3030
steps:
3131
- uses: actions/checkout@v2

gen.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ def ctp(data: str) -> str:
3737
DOUBLE_QUOTE: str = '"'
3838
TRIPLE_QUOTE: str = '"""'
3939
SSIZE = ctc("ssize_t")
40+
INT = ctc("int")
4041

4142
C_TYPES = {
4243
"void": "None",
4344
"PyObject*": ct("py_object"),
44-
"int": ctc("int"),
45+
"int": INT,
4546
"void*": VOID_P,
4647
"Py_ssize_t": SSIZE,
4748
"char": ctc("char"),
@@ -73,11 +74,12 @@ def ctp(data: str) -> str:
7374
"Py_hash_t": SSIZE,
7475
"Py_buffer": "Py_buffer",
7576
"PyOS_sighandler_t": VOID_P,
76-
"PyGILState_STATE": VOID_P,
77+
"PyGILState_STATE": INT,
7778
"PyModuleDef": "PyModuleDef",
7879
"struct PyModuleDef": "PyModuleDef",
7980
"PyCodeObject": "PyCodeObject",
8081
"PyCapsule_Destructor": VOID_P,
82+
"PyGILState": INT,
8183
}
8284

8385
CT_TYPES = {

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ classifiers = [
1818
"Programming Language :: Python :: 3.8",
1919
"Programming Language :: Python :: 3.9",
2020
"Programming Language :: Python :: 3.10",
21-
"Programming Language :: Python :: 3.11",
2221
"Programming Language :: Python :: Implementation :: CPython",
2322
]
2423
dependencies = [

src/pointers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
)
66

77
from ._utils import force_set_attr
8+
from .api_bindings import *
89
from .base_pointers import (
910
BaseAllocatedPointer, BaseCPointer, BaseObjectPointer, BasePointer,
1011
BasicPointer, Dereferencable, IterDereferencable, Sized, Typed

src/pointers/_pyapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ class PyCodeObject(ctypes.Structure):
461461
# int PyGC_IsEnabled(void)
462462
_register('PyGC_IsEnabled', ctypes.c_int, (), minver="3.10",)
463463
# PyGILState_STATE PyGILState_Ensure()
464-
_register('PyGILState_Ensure', ctypes.c_void_p, ())
464+
_register('PyGILState_Ensure', ctypes.c_int, ())
465465
# PyThreadState* PyGILState_GetThisThreadState()
466466
_register('PyGILState_GetThisThreadState', ctypes.POINTER(PyThreadState), ())
467467
# PyObject* PyImport_AddModule(const char* name)

0 commit comments

Comments
 (0)