summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-25 13:53:19 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-25 13:53:19 (GMT)
commitbb6e4a0b31402f2e242f8f4be9a26e07d3dcc1b7 (patch)
tree552f1bdf983de7b8957bb65597c691c932d063db /Objects/longobject.c
parentdde0815c359fc321b0e7a94f885132e2e77534a1 (diff)
parentf9afda57ad7d0394531982b2c9de8301c5a54e45 (diff)
downloadcpython-bb6e4a0b31402f2e242f8f4be9a26e07d3dcc1b7.zip
cpython-bb6e4a0b31402f2e242f8f4be9a26e07d3dcc1b7.tar.gz
cpython-bb6e4a0b31402f2e242f8f4be9a26e07d3dcc1b7.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 2cc1585..d05de8b 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -4675,7 +4675,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;