Skip to content

Commit 9d30863

Browse files
committed
Add lock to module
1 parent 1a1b4e8 commit 9d30863

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/_threadmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,10 @@ thread_module_exec(PyObject *module)
18631863
if (state->lock_type == NULL) {
18641864
return -1;
18651865
}
1866+
if (PyModule_AddType(module, state->lock_type) < 0) {
1867+
return -1;
1868+
}
1869+
// Old alias: lock -> LockType
18661870
if (PyDict_SetItemString(d, "LockType", (PyObject *)state->lock_type) < 0) {
18671871
return -1;
18681872
}

0 commit comments

Comments
 (0)