diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 15:47:01 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 15:47:01 +0200 |
commit | f51e9993c75613037071d883b92d64ff75f4d520 (patch) | |
tree | fdbaafbc0d3e770340b762aba90fd120fdc949fe /Objects/longobject.c | |
parent | 9024194b2ea238eda9d54fe44a49029fc167b31c (diff) | |
download | cpython-f51e9993c75613037071d883b92d64ff75f4d520.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/longobject.c')
-rw-r--r-- | Objects/longobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 7036c0ea4a..3a64b530ee 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -4405,7 +4405,7 @@ long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) tmp = (PyLongObject *)long_new(&PyLong_Type, args, kwds); if (tmp == NULL) return NULL; - assert(PyLong_CheckExact(tmp)); + assert(PyLong_Check(tmp)); n = Py_SIZE(tmp); if (n < 0) n = -n; |