Skip to content

Commit a0aa4d5

Browse files
committed
✨ add experimental support for free-threaded python #55
1 parent 66f01aa commit a0aa4d5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/python.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@
4141
#include <pybind11/stl.h>
4242

4343
#ifdef VERSION_INFO
44-
#define PY_MODULE(var) PYBIND11_MODULE(_c104, var)
44+
#define PY_MODULE(var) PYBIND11_MODULE(_c104, var, py::mod_gil_not_used())
4545
#else
4646
#define VERSION_INFO "embedded"
4747
#include <pybind11/embed.h>
48-
#define PY_MODULE(var) PYBIND11_EMBEDDED_MODULE(c104, var)
48+
#define PY_MODULE(var) \
49+
PYBIND11_EMBEDDED_MODULE(c104, var, py::mod_gil_not_used())
4950
#endif
5051

5152
using namespace pybind11::literals;

0 commit comments

Comments
 (0)