Commit 066da48
authored
Add a C macro to configure "Py_mod_gil" at C compile time (GH-7404)
I found a use case for setting `Py_mod_gil` differently in Py3.13 and Py3.14,
but regenerating the whole C file just to switch between them is rather wasteful.
So here's a new C macro `CYTHON_FREETHREADING_COMPATIBLE` that allows
defining the setting from the outside.
Having a directive is still useful because we don't want to require the
C macro to be set. It should usually have a fixed value for a given module.1 parent 704b09c commit 066da48
File tree
2 files changed
+20
-4
lines changed- Cython/Compiler
- docs/src/userguide
2 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
982 | 993 | | |
983 | 994 | | |
984 | 995 | | |
| |||
3628 | 3639 | | |
3629 | 3640 | | |
3630 | 3641 | | |
3631 | | - | |
3632 | | - | |
3633 | | - | |
3634 | | - | |
| 3642 | + | |
3635 | 3643 | | |
3636 | 3644 | | |
3637 | 3645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
| 963 | + | |
| 964 | + | |
963 | 965 | | |
964 | 966 | | |
965 | 967 | | |
| |||
1416 | 1418 | | |
1417 | 1419 | | |
1418 | 1420 | | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1419 | 1427 | | |
1420 | 1428 | | |
1421 | 1429 | | |
| |||
0 commit comments