summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_decimal/_decimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index bcc31e5..dd33f97 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -2636,7 +2636,7 @@ dec_from_float(PyObject *type, PyObject *pyfloat)
CURRENT_CONTEXT(context);
result = PyDecType_FromFloatExact(&PyDec_Type, pyfloat, context);
- if (!PyDec_CheckExact(type) && result != NULL) {
+ if (type != (PyObject *)&PyDec_Type && result != NULL) {
Py_SETREF(result, PyObject_CallFunctionObjArgs(type, result, NULL));
}