diff options
author | Stefan Krah <skrah@bytereef.org> | 2016-06-20 14:12:52 +0200 |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2016-06-20 14:12:52 +0200 |
commit | ea8c0e45a8b676d9206fbc9f8bde5e41ccd69ca6 (patch) | |
tree | a605ed5ce4abfd2c0c798b2b8da2ed46bb2cc256 /Modules/_decimal | |
parent | c5ae6ebf84a248a89d3fb921ce2e8cd6d55137f3 (diff) | |
download | cpython-ea8c0e45a8b676d9206fbc9f8bde5e41ccd69ca6.tar.gz |
Issue #27006: Do not use PyDec_CheckExact() on a type.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r-- | Modules/_decimal/_decimal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index e69d715bb2..22053b4924 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -2637,7 +2637,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)); } |