summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-01-19 05:17:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-01-19 05:17:54 (GMT)
commita4acf1ff847f072b2035bbb02c9af5496e59d6d6 (patch)
treec9b6597035109690871e435bd0eb51a5c31eb8c2
parent27d9c3d39f21fe5fa4b501b013d3250c86076464 (diff)
downloadcpython-a4acf1ff847f072b2035bbb02c9af5496e59d6d6.zip
cpython-a4acf1ff847f072b2035bbb02c9af5496e59d6d6.tar.gz
cpython-a4acf1ff847f072b2035bbb02c9af5496e59d6d6.tar.bz2
set tp_new from the class in the hierarchy that actually owns the descriptor (closes #25731)
Debugging by Eryk Sun.
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 8a5623f..baee1f1 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6239,7 +6239,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
sanity checks and constructing a new argument
list. Cut all that nonsense short -- this speeds
up instance creation tremendously. */
- specific = (void *)type->tp_new;
+ specific = (void *)((PyTypeObject *)PyCFunction_GET_SELF(descr))->tp_new;
/* XXX I'm not 100% sure that there isn't a hole
in this reasoning that requires additional
sanity checks. I'll buy the first person to