File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2908,7 +2908,8 @@ slot_sq_item(PyObject *self, int i)
29082908 if (func -> ob_type == & PyWrapperDescr_Type ) {
29092909 PyWrapperDescrObject * wrapper =
29102910 (PyWrapperDescrObject * )func ;
2911- if (wrapper -> d_base -> wrapper == wrap_sq_item ) {
2911+ if (wrapper -> d_base -> wrapper == wrap_sq_item &&
2912+ PyType_IsSubtype (self -> ob_type , wrapper -> d_type )) {
29122913 intargfunc f ;
29132914 f = (intargfunc )(wrapper -> d_wrapped );
29142915 return f (self , i );
@@ -3938,9 +3939,10 @@ fixup_slot_dispatchers(PyTypeObject *type)
39383939 if (descr -> ob_type == & PyWrapperDescr_Type ) {
39393940 d = (PyWrapperDescrObject * )descr ;
39403941 if (d -> d_base -> wrapper == p -> wrapper &&
3941- PyType_IsSubtype (type , d -> d_type )) {
3942+ PyType_IsSubtype (type , d -> d_type ))
3943+ {
39423944 if (specific == NULL ||
3943- specific == d -> d_wrapped )
3945+ specific == d -> d_wrapped )
39443946 specific = d -> d_wrapped ;
39453947 else
39463948 use_generic = 1 ;
You can’t perform that action at this time.
0 commit comments