diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 15:53:19 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 15:53:19 +0200 |
commit | bb6e4a0b31402f2e242f8f4be9a26e07d3dcc1b7 (patch) | |
tree | 552f1bdf983de7b8957bb65597c691c932d063db /Objects/floatobject.c | |
parent | dde0815c359fc321b0e7a94f885132e2e77534a1 (diff) | |
parent | f9afda57ad7d0394531982b2c9de8301c5a54e45 (diff) | |
download | cpython-git-bb6e4a0b31402f2e242f8f4be9a26e07d3dcc1b7.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index b8d6f2b52e..d92bec35b5 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -1568,7 +1568,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); |