From 947f099d99f52badb14837066463c44b63476cfd Mon Sep 17 00:00:00 2001
From: Stefan Krah <skrah@bytereef.org>
Date: Mon, 20 Jun 2016 14:12:52 +0200
Subject: Issue #27006: Do not use PyDec_CheckExact() on a type.

---
 Modules/_decimal/_decimal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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));
     }
 
-- 
cgit v0.12