Skip to content

Commit 012b81f

Browse files
committed
fix wrong lock
1 parent 71397b2 commit 012b81f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/_decimal/_decimal.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3517,9 +3517,9 @@ convert_op_cmp(PyObject **vcmp, PyObject **wcmp, PyObject *v, PyObject *w,
35173517
*wcmp = NULL;
35183518
}
35193519
else {
3520-
CTX_LOCK(ctx);
3520+
CTX_LOCK(context);
35213521
ctx->status |= MPD_Float_operation;
3522-
CTX_UNLOCK(ctx);
3522+
CTX_UNLOCK(context);
35233523
*wcmp = PyDec_FromFloatExact(state, w, context);
35243524
}
35253525
}
@@ -3534,9 +3534,9 @@ convert_op_cmp(PyObject **vcmp, PyObject **wcmp, PyObject *v, PyObject *w,
35343534
*wcmp = NULL;
35353535
}
35363536
else {
3537-
CTX_LOCK(ctx);
3537+
CTX_LOCK(context);
35383538
ctx->status |= MPD_Float_operation;
3539-
CTX_UNLOCK(ctx);
3539+
CTX_UNLOCK(context);
35403540
*wcmp = PyDec_FromFloatExact(state, tmp, context);
35413541
Py_DECREF(tmp);
35423542
}

0 commit comments

Comments
 (0)