diff options
author | Stefan Krah <skrah@bytereef.org> | 2016-06-20 12:12:52 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2016-06-20 12:12:52 (GMT) |
commit | 947f099d99f52badb14837066463c44b63476cfd (patch) | |
tree | 4dd7d7bf009cdf590b1c0c7a9f4d311c731b0700 /Modules | |
parent | 6817c59cf08ac214737d86f37e63a431385a9613 (diff) | |
download | cpython-947f099d99f52badb14837066463c44b63476cfd.zip cpython-947f099d99f52badb14837066463c44b63476cfd.tar.gz cpython-947f099d99f52badb14837066463c44b63476cfd.tar.bz2 |
Issue #27006: Do not use PyDec_CheckExact() on a type.
Diffstat (limited to 'Modules')
-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 e69d715..22053b4 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)); } |