Skip to content

Commit e7c6674

Browse files
committed
Enable free threading
1 parent 6c529f3 commit e7c6674

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

selectolax/lexbor.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# cython: freethreading_compatible = True
12
from libc.stdint cimport uint8_t, uint32_t, uintptr_t
23

34
cdef extern from "lexbor/core/core.h" nogil:

selectolax/parser.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
# cython: freethreading_compatible = True
22
cdef extern from "myhtml/myhtml.h" nogil:
33
ctypedef unsigned int mystatus_t
44
ctypedef struct myhtml_t

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
"emit_code_comments": True,
6262
"boundscheck": False,
6363
"wraparound": False,
64+
"freethreading_compatible": "True",
65+
"subinterpreters_compatible": "own_gil",
6466
}
6567

6668

@@ -143,8 +145,8 @@ def make_extensions():
143145
"-Wno-unused-variable",
144146
"-Wno-unused-function",
145147
"-std=c99",
146-
"-O2",
147-
"-g0",
148+
"-O0",
149+
"-g",
148150
]
149151
compile_arguments.extend(args)
150152
compile_arguments_lxb.extend(args)

0 commit comments

Comments
 (0)