Skip to content

Commit c750d92

Browse files
committed
Move call to _PyObject_SetDeferredRefcount()
1 parent d407ad9 commit c750d92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_threadmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,8 @@ lock_new_impl(PyTypeObject *type)
950950
if (self == NULL) {
951951
return NULL;
952952
}
953-
_PyObject_SetDeferredRefcount((PyObject *)self);
954953
self->lock = (PyMutex){0};
954+
_PyObject_SetDeferredRefcount((PyObject *)self);
955955
return (PyObject *)self;
956956
}
957957

@@ -1222,8 +1222,8 @@ rlock_new_impl(PyTypeObject *type)
12221222
if (self == NULL) {
12231223
return NULL;
12241224
}
1225-
_PyObject_SetDeferredRefcount((PyObject *)self);
12261225
self->lock = (_PyRecursiveMutex){0};
1226+
_PyObject_SetDeferredRefcount((PyObject *)self);
12271227
return (PyObject *) self;
12281228
}
12291229

0 commit comments

Comments
 (0)