[Python-checkins] cpython (3.5): Issue #27006: Do not use PyDec_CheckExact() on a type.
stefan.krah
python-checkins at python.org
Mon Jun 20 08:13:45 EDT 2016
https://hg.python.org/cpython/rev/51a7a97c3ed4
changeset: 102112:51a7a97c3ed4
branch: 3.5
parent: 102110:dd3f48f1df86
user: Stefan Krah <skrah at bytereef.org>
date: Mon Jun 20 14:12:52 2016 +0200
summary:
Issue #27006: Do not use PyDec_CheckExact() on a type.
files:
Modules/_decimal/_decimal.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -2637,7 +2637,7 @@
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));
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list