diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 13:52:04 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-25 13:52:04 (GMT) |
commit | f9afda57ad7d0394531982b2c9de8301c5a54e45 (patch) | |
tree | 8a09bb1aa816b4daf6777e630333dfece309cdb5 /Objects/longobject.c | |
parent | c5f3b4285a8f3f90305d777a88a856a623c22cb1 (diff) | |
parent | 15095800a381a396cbc077cb5320203a8feae51a (diff) | |
download | cpython-f9afda57ad7d0394531982b2c9de8301c5a54e45.zip cpython-f9afda57ad7d0394531982b2c9de8301c5a54e45.tar.gz cpython-f9afda57ad7d0394531982b2c9de8301c5a54e45.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/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 5f22455..d821e4b 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -4611,7 +4611,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; |