summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-11-07 22:47:19 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-11-07 22:47:19 (GMT)
commited16eff57eaf5c89057f8da6328785fd887c01df (patch)
tree81a8ef54df0e9db30f5acf4ee1f6e338e850443c /Modules
parentf4abc7b8a016da5b1783f471f2f376d7e9c27d60 (diff)
downloadcpython-ed16eff57eaf5c89057f8da6328785fd887c01df.zip
cpython-ed16eff57eaf5c89057f8da6328785fd887c01df.tar.gz
cpython-ed16eff57eaf5c89057f8da6328785fd887c01df.tar.bz2
Issue #16431: Also fix the opposite direction.
Diffstat (limited to 'Modules')
-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 0bc484f..0e1d304 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -2345,7 +2345,7 @@ PyDecType_FromDecimalExact(PyTypeObject *type, PyObject *v, PyObject *context)
PyObject *dec;
uint32_t status = 0;
- if (type == &PyDec_Type) {
+ if (type == Py_TYPE(v)) {
Py_INCREF(v);
return v;
}