diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-11-08 10:19:55 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-11-08 10:19:55 (GMT) |
commit | 4cb103ee39b761ec3f9202609aae490505126b0c (patch) | |
tree | b6b5c72e9f3d0f205c2851e732611c336997416f /Modules | |
parent | dee904342326969befcbef1fe51ccdf11f93c9c5 (diff) | |
parent | 0f82b76b574724618f7de929c0f30aecc58c3bf7 (diff) | |
download | cpython-4cb103ee39b761ec3f9202609aae490505126b0c.zip cpython-4cb103ee39b761ec3f9202609aae490505126b0c.tar.gz cpython-4cb103ee39b761ec3f9202609aae490505126b0c.tar.bz2 |
Merge 3.3.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_decimal/_decimal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 0e1d304..e951ded 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -2338,14 +2338,14 @@ PyDecType_FromFloat(PyTypeObject *type, PyObject *v, return dec; } -/* Return a new PyDecObject (subtype) from a Decimal. */ +/* Return a new PyDecObject or a subtype from a Decimal. */ static PyObject * PyDecType_FromDecimalExact(PyTypeObject *type, PyObject *v, PyObject *context) { PyObject *dec; uint32_t status = 0; - if (type == Py_TYPE(v)) { + if (type == &PyDec_Type && PyDec_CheckExact(v)) { Py_INCREF(v); return v; } |