summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-25 13:47:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-25 13:47:01 (GMT)
commit15095800a381a396cbc077cb5320203a8feae51a (patch)
treeba1f16c1b9be09a1f14d3af644c39e52924ee63f /Objects/floatobject.c
parenta49de6be3669e4698ea55d22e0fdebb29be63f2e (diff)
downloadcpython-15095800a381a396cbc077cb5320203a8feae51a.zip
cpython-15095800a381a396cbc077cb5320203a8feae51a.tar.gz
cpython-15095800a381a396cbc077cb5320203a8feae51a.tar.bz2
Issue #24731: Fixed crash on converting objects with special methods
__bytes__, __trunc__, and __float__ returning instances of subclasses of bytes, int, and float to subclasses of bytes, int, and float correspondingly.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 9c1b714..acd88d6 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1567,7 +1567,7 @@ float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
tmp = float_new(&PyFloat_Type, args, kwds);
if (tmp == NULL)
return NULL;
- assert(PyFloat_CheckExact(tmp));
+ assert(PyFloat_Check(tmp));
newobj = type->tp_alloc(type, 0);
if (newobj == NULL) {
Py_DECREF(tmp);