Skip to content

Commit 65143f0

Browse files
Copilothzhangxyz
andauthored
Fix GIL warning in free-threaded Python (#49)
* Initial plan * Fix warning in free threading Python by declaring module as GIL-safe Co-authored-by: hzhangxyz <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: hzhangxyz <[email protected]>
1 parent cc8da7a commit 65143f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apyds/ds.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ auto rule_rename(ds::rule_t* rule, ds::rule_t* prefix_and_suffix, int length) ->
108108
return std::unique_ptr<ds::rule_t>(result);
109109
}
110110

111-
PYBIND11_MODULE(_ds, m) {
111+
PYBIND11_MODULE(_ds, m, py::mod_gil_not_used()) {
112112
auto string_t = py::class_<ds::string_t>(m, "String");
113113
auto item_t = py::class_<ds::item_t>(m, "Item");
114114
auto variable_t = py::class_<ds::variable_t>(m, "Variable");

0 commit comments

Comments
 (0)