summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-01-19 05:11:18 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-01-19 05:11:18 (GMT)
commit9ad11544bfb80b7881e0d567e40ef2fa2da58f02 (patch)
tree3541a0acf72d617ab42811ced0b4dac474b65d73 /Objects
parent9e9f850f9912228a8963f94f4b0480215a6c168c (diff)
downloadcpython-9ad11544bfb80b7881e0d567e40ef2fa2da58f02.zip
cpython-9ad11544bfb80b7881e0d567e40ef2fa2da58f02.tar.gz
cpython-9ad11544bfb80b7881e0d567e40ef2fa2da58f02.tar.bz2
set tp_new from the class in the hierarchy that actually owns the descriptor (closes #25731)
Debugging by Eryk Sun.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 415f916..810afd3 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6777,7 +6777,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